From: | Mark Dilger <pgsql(at)markdilger(dot)com> |
---|---|
To: | "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com> |
Subject: | Re: psql feature thought |
Date: | 2006-05-16 20:39:02 |
Message-ID: | 446A3866.3060909@markdilger.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Jim C. Nasby | 2006-05-16 20:42:46 | Re: Compression and on-disk sorting |
Previous Message | Alvaro Herrera | 2006-05-16 19:49:50 | Re: [BUGS] BUG #2429: Explain does not report object's schema |