proposal: multiple psql option -c

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема proposal: multiple psql option -c
Дата
Msg-id CAKFQuwbVp-4dEf=YFw2hwjyegt84i36Vj0rAvmjyutZB8xCFGQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: proposal: multiple psql option -c  (Pavel Stehule <pavel.stehule@gmail.com>)
Ответы Re: proposal: multiple psql option -c  (Pavel Stehule <pavel.stehule@gmail.com>)
Список pgsql-hackers
On Saturday, July 25, 2015, Pavel Stehule <pavel.stehule@gmail.com> wrote:
2015-07-23 17:52 GMT+02:00 Robert Haas <robertmhaas@gmail.com>:
On Fri, Jul 17, 2015 at 12:36 AM, Pavel Stehule <pavel.stehule@gmail.com> wrote:
>> Or just properly understand the ; ?
>>
>> -c "select * from foo; update bar set baz = 'bing'; vacuum bar;"
>
> there is a risk of compatibility issues - all statements runs under one
> transaction implicitly

So what?

[pavel@dhcppc2 ~]$ psql -c "insert into x values(txid_current()::text);insert into x values(txid_current()::text)" postgres
INSERT 0 1
the state string "INSERT 0 1" is buggy probably

How do you figure?  The last statement only inserted one record.

To that point would you expect each separate -c to output its results to the console?

David J.

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

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: proposal: multiple psql option -c
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: Proposal for CSN based snapshots