Re: autocommit to off?
От | Bruce Momjian |
---|---|
Тема | Re: autocommit to off? |
Дата | |
Msg-id | 200403092318.i29NIQb29465@candle.pha.pa.us обсуждение исходный текст |
Ответ на | autocommit to off? (Bricklen <bricklen-rem@yahoo.comz>) |
Список | 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@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073
В списке pgsql-general по дате отправления: