Re: InitPostgres and flatfiles question

Поиск
Список
Период
Сортировка
От Markus Schiltknecht
Тема Re: InitPostgres and flatfiles question
Дата
Msg-id 459D2B37.4080704@bluegap.ch
обсуждение исходный текст
Ответ на Re: InitPostgres and flatfiles question  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: InitPostgres and flatfiles question  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Hi,

Tom Lane wrote:
> 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.

Is there a good reason to not let psql -c behave exactly like psql from 
STDIN? I found this exception to be quite confusing. Of course that 
could break compatibility with certain scripts, but can this be fixed 
without doing so?

Regards

Markus



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Gregory Stark
Дата:
Сообщение: Re: Odd numeric->float4/8 casting behaviour
Следующее
От: Bill Moran
Дата:
Сообщение: Re: [PATCHES] Patch to log usage of temporary files