From: | "Gurjeet Singh" <singh(dot)gurjeet(at)gmail(dot)com> |
---|---|
To: | "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>, "Peter Eisentraut" <peter_e(at)gmx(dot)net>, "Magnus Hagander" <magnus(at)hagander(dot)net>, pgsql-patches(at)postgresql(dot)org, "Chad Wagner" <chad(dot)wagner(at)gmail(dot)com> |
Subject: | Re: \prompt for psql |
Date: | 2007-02-09 07:07:12 |
Message-ID: | 65937bea0702082307r19b272f1i2e2e996aae570d9@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-patches |
On 2/9/07, Alvaro Herrera <alvherre(at)commandprompt(dot)com> wrote:
>
> At least it'd help those poor people trying to do conditional COMMIT or
> ROLLBACK based on the transaction status.
The user doesn't need to check the status of the transaction if he just
needs to end it. Just fire the END command and it'll take care of whether to
COMMIT or ROLLBACK the transaction:
edb=# begin;
BEGIN
edb=# select count(*) from pg_class;
count
-------
280
(1 row)
edb=# select count(*) from pg_class_xyz;
ERROR: relation "pg_class_xyz" does not exist
edb=# end;
ROLLBACK
edb=#
Regards,
--
gurjeet[(dot)singh](at)EnterpriseDB(dot)com
singh(dot)gurjeet(at){ gmail | hotmail | yahoo }.com
From | Date | Subject | |
---|---|---|---|
Next Message | 原田登志 | 2007-02-09 08:29:21 | patch for ECPG (BUG #2956: ECPG does not treat multibyte characters correctly.) |
Previous Message | Joshua D. Drake | 2007-02-09 05:45:35 | Re: \prompt for psql |