Re: psql feature thought - Mailing list pgsql-hackers

From Mark Dilger
Subject Re: psql feature thought
Date
Msg-id 446A3866.3060909@markdilger.com
Whole thread Raw
In response to psql feature thought  ("Joshua D. Drake" <jd@commandprompt.com>)
List 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


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: [BUGS] BUG #2429: Explain does not report object's schema
Next
From: "Jim C. Nasby"
Date:
Subject: Re: Compression and on-disk sorting