Re: \prompt for psql - Mailing list pgsql-patches

From Gurjeet Singh
Subject Re: \prompt for psql
Date
Msg-id 65937bea0702082307r19b272f1i2e2e996aae570d9@mail.gmail.com
Whole thread Raw
In response to Re: \prompt for psql  (Alvaro Herrera <alvherre@commandprompt.com>)
Responses Re: \prompt for psql  (Alvaro Herrera <alvherre@commandprompt.com>)
List pgsql-patches
On 2/9/07, Alvaro Herrera <alvherre@commandprompt.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[.singh]@EnterpriseDB.com
singh.gurjeet@{ gmail | hotmail | yahoo }.com

pgsql-patches by date:

Previous
From: "Joshua D. Drake"
Date:
Subject: Re: \prompt for psql
Next
From: "Pavel Stehule"
Date:
Subject: Re: better support of out parameters in plperl