Re: InitPostgres and flatfiles question - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: InitPostgres and flatfiles question
Date
Msg-id 200701050407.l0547DH19721@momjian.us
Whole thread Raw
In response to Re: InitPostgres and flatfiles question  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: InitPostgres and flatfiles question  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane wrote:
> Bruce Momjian <bruce@momjian.us> writes:
> > What value is allowing multiple queries via PQexec()
> 
> The only argument I can think of is that it allows applications to be
> sloppy about parsing a SQL script into individual commands before they
> send it.  (I think initdb may be guilty of exactly that BTW...)  At the
> same time you could argue that such sloppiness is inherently a Bad Idea.

I thought the idea was that psql was going to split multiple -c commands
into separate PQexec() calls, so sloppy was OK, and if they want a
single transaction, add BEGIN/END to the string.

--  Bruce Momjian   bruce@momjian.us EnterpriseDB    http://www.enterprisedb.com
 + If your life is a hard drive, Christ can be your backup. +


pgsql-hackers by date:

Previous
From: Gavin Sherry
Date:
Subject: Re: ideas for auto-processing patches
Next
From: Tom Lane
Date:
Subject: Re: InitPostgres and flatfiles question