Joshua D. Drake wrote:
> Hello,
>
> I was dinking around wand came across something that may (or may not be
> useful).
>
> What if single line statements that were seperated by ; within psql were
> implicitly within a transaction?
>
> E.g;
>
> postgres=# select * from foo; update foo set bar = 'baz'; delete from bing;
>
> Would be a single transaction ? The begin/commit would be implicit.
>
> Joshua D. Drake
>
>
>
In psql (and in bash, etc) I like to type multiple commands separated by ';' if
I want them all to run but I don't want to wait for the first to complete before
typing the second, third, etc. (Possibly I would rather go get a coffee while
the commands are running.)
So, I might type:
psql# <LONG RUNNING INSERT STATEMENT>; <LONG RUNNING SELECT STATEMENT>
and let it fly. It would violate the principle of least surprise if doing this
on one line caused the semantics to change.
mark