From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Bricklen <bricklen-rem(at)yahoo(dot)comz> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: autocommit to off? |
Date: | 2004-03-09 23:18:26 |
Message-ID: | 200403092318.i29NIQb29465@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Bricklen wrote:
> Hi all,
>
> I've scoured the net for a simple way to set AUTOCOMMIT off in psql, for
> the duration of a session (not simply a transaction). The only real
> reference that I can find says that "\set autocommit off" will do what I
> want. It doesn't though. For example, if session A inserts a row, then
> session B has access to that data immediately (from another terminal).
>
> I realize that you can fire off a begin/end pair for every statement,
> but I'm looking for something more global.
>
> Oracle's SQL*Plus is what I'm used to, which is the reason that I'm asking.
>
> Feel free to correct any (mis)understandings I have of psql.
Use uppercase, \set AUTOCOMMIT off
test=> \set AUTOCOMMIT off
test=> select 1;
?column?
----------
1
(1 row)
test=> select 2;
?column?
----------
2
(1 row)
test=> commit;
COMMIT
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
From | Date | Subject | |
---|---|---|---|
Next Message | Stephan Szabo | 2004-03-09 23:22:48 | Re: C locale |
Previous Message | Tom Lane | 2004-03-09 23:10:31 | Re: autocommit to off? |