From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>, dinesh kumar <dineshkumar02(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: proposal: multiple psql option -c |
Date: | 2015-07-25 09:27:52 |
Message-ID: | CAFj8pRAztH1h7KhD9Z5emU68X0r2cPf5bvD9HS4jeiN+UXOAyQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
2015-07-25 10:33 GMT+02:00 David G. Johnston <david(dot)g(dot)johnston(at)gmail(dot)com>:
> On Saturday, July 25, 2015, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> wrote:
>>
>> 2015-07-23 17:52 GMT+02:00 Robert Haas <robertmhaas(at)gmail(dot)com>:
>>
>>> On Fri, Jul 17, 2015 at 12:36 AM, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)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(at)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.
>
I understand now, it consistent with current design. So from this view it
is not error.
>
> To that point would you expect each separate -c to output its results to
> the console?
>
It will be nice side effect, but my primary problem was a impossibility to
combine VACUUM and any other statement to one simple psql call.
Pavel
> David J.
>
From | Date | Subject | |
---|---|---|---|
Next Message | Amit Kapila | 2015-07-25 10:54:45 | Re: RFC: replace pg_stat_activity.waiting with something more descriptive |
Previous Message | Simon Riggs | 2015-07-25 08:46:02 | Re: optimizing vacuum truncation scans |