Re: psql feature thought

Поиск
Список
Период
Сортировка
От Qingqing Zhou
Тема Re: psql feature thought
Дата
Msg-id e4bgp8$2l9f$1@news.hub.org
обсуждение исходный текст
Ответ на psql feature thought  ("Joshua D. Drake" <jd@commandprompt.com>)
Список pgsql-hackers
""Joshua D. Drake"" <jd@commandprompt.com> wrote
>
> 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.
>

This is not in a single transaction currently. This is not a back compatible
behavior. Also, I am not sure how difficult to implement it in current psql
code. Think of this case:

begin;
select; update; delete;
end;

Line 2 is already in a transaction, so psql must be able to tell it (maybe
we already be able to do so?). Not to speak of the SAVEPOINT control points.

Regards,
Qingqing





В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: psql feature thought
Следующее
От: "Qingqing Zhou"
Дата:
Сообщение: Re: Why use " != "