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

From Tom Lane
Subject Re: InitPostgres and flatfiles question
Date
Msg-id 1955.1168135757@sss.pgh.pa.us
Whole thread Raw
In response to Re: InitPostgres and flatfiles question  (Bruce Momjian <bruce@momjian.us>)
List pgsql-hackers
Bruce Momjian <bruce@momjian.us> writes:
> Do we need a TODO for this?

Well, if we *don't* change the backend to disallow multi statements per
PQexec, then we'd probably better do something about this.  If we do
make that change then it's not a problem anymore.

>> Hm, that's an interesting point.  psql's -c just shoves its whole
>> argument string at the backend in one PQexec(), instead of dividing
>> at semicolons as psql does with normal input.  And so it winds up as
>> a single transaction because postgres.c doesn't force a transaction
>> commit until the end of the querystring.  But that's not a "transaction
>> block" in the normal sense and so it doesn't trigger the
>> PreventTransactionChain defense in CREATE DATABASE and elsewhere.

        regards, tom lane


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: InitPostgres and flatfiles question
Next
From: "Joshua D. Drake"
Date:
Subject: Re: pg_ctl options