Re: InitPostgres and flatfiles question

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: InitPostgres and flatfiles question
Дата
Msg-id 1955.1168135757@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: InitPostgres and flatfiles question  (Bruce Momjian <bruce@momjian.us>)
Список 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 по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: InitPostgres and flatfiles question
Следующее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: pg_ctl options