Re: psql feature thought - Mailing list pgsql-hackers

From Qingqing Zhou
Subject Re: psql feature thought
Date
Msg-id e4bgp8$2l9f$1@news.hub.org
Whole thread Raw
In response to psql feature thought  ("Joshua D. Drake" <jd@commandprompt.com>)
List 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 by date:

Previous
From: Tom Lane
Date:
Subject: Re: psql feature thought
Next
From: "Qingqing Zhou"
Date:
Subject: Re: Why use " != "