Re: InitPostgres and flatfiles question

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Markus Schiltknecht <markus(at)bluegap(dot)ch>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: InitPostgres and flatfiles question
Date: 2007-01-05 04:07:13
Message-ID: 200701050407.l0547DH19721@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> Bruce Momjian <bruce(at)momjian(dot)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(at)momjian(dot)us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2007-01-05 04:13:39 Re: InitPostgres and flatfiles question
Previous Message Bruce Momjian 2007-01-05 04:02:15 Re: Tabs or Spaces