RE: Autocommit off in psql??

From: Björn Lundin <bjorn(dot)lundin(at)swipnet(dot)se>
To: pgsql-general(at)postgresql(dot)org
Subject: RE: Autocommit off in psql??
Date: 2001-05-23 19:26:54
Message-ID: 9eh2vh$h10$1@news.tht.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Yes, I meant turn off Autocommit for the entire psql session.
Starting every manipulation of the database with a BEGIN is
a bit tiresome, and i often catch myself with forgetting it.
If it isn't possible, it would be a nice featue!?
Björn

Tim Mickol wrote:

> Actually, I think the original question alluded to SQL*PLUS behavior that
> allows one to disable autocommit for an ENTIRE session,
> not simply a discrete transaction. In psql, in order to enforce
> autocommit=off for an entire session, you must repeatedly issue a series
> of BEGIN directives, one following each ROLLBACK, COMMIT, or ABORT, yes?
>
>
> Yes, just start an explicit transaction with "BEGIN" -- this disables
> autocommit (so when you want to commit your transaction, you'll need
> to do "COMMIT" by hand).
>
> Cheers,
>
> Neil
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2001-05-23 19:33:38 Re:
Previous Message Tom Lane 2001-05-23 19:25:44 Re: NOTIFY/LISTEN Using Embedded SQL (ecpg)