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 [pavel@dhcppc2 ~]$ psql postgres -c "select * from x" a ------ 1888 1888 (2 rows)
I would to run -c command in separate transactions (when option --single-transaction is not used).