Re: psql feature thought

Поиск
Список
Период
Сортировка
Искать
От
Mark Dilger
Тема
Re: psql feature thought
Дата
в 17:39:22
Msg-id
446A3866.3060909@markdilger.com
Ответ на
psql feature thought (Joshua D. Drake)
Список
Дерево обсуждения
Re: psql feature thought "Qingqing Zhou" <zhouqq@cs.toronto.edu>
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#  ; 

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 по дате отправления
От: Alvaro Herrera
Дата:
От: Jim C. Nasby
Дата:
FAQ