set AUTOCOMMIT OFF in psqlrc not having affect

From: Christian Fowler <spider(at)viovio(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: set AUTOCOMMIT OFF in psqlrc not having affect
Date: 2004-10-17 18:47:46
Message-ID: Pine.LNX.4.61.0410171443000.13757@leda.steelsun.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin


I have \set AUTOCOMMIT OFF in my .psqlrc and it seems psql seems to not
have any effect. Am I missing something? I've been googling and googling
and seem a bit lost at this point.

[domain(at)host host]$ cat ~/.psqlrc
\set AUTOCOMMIT OFF
\echo 'AUTOCOMMIT is' :AUTOCOMMIT
\set PROMPT1 'host.%/%R%# '
\timing

*timing statments where trimmed below*

[domain(at)host host]$ psql
Welcome to psql 7.4.5, the PostgreSQL interactive terminal.

Type: \copyright for distribution terms
\h for help with SQL commands
\? for help on internal slash commands
\g or terminate with semicolon to execute query
\q to quit

AUTOCOMMIT is OFF
Timing is on.
host.domain=# commit;
WARNING: there is no transaction in progress
COMMIT
host.domain=# update foo set foo_type_id = 3 where foo_id=200000234;
UPDATE 1
host.domain=# commit;
WARNING: there is no transaction in progress
COMMIT
host.domain=# update foo set foo_type_id = 3 where foo_id=200000234;
UPDATE 1
host.domain=# rollback;
WARNING: there is no transaction in progress
ROLLBACK
host.domain=# begin;
BEGIN
host.domain=# update foo set foo_type_id = 3 where foo_id=200000234;
UPDATE 1
host.domain=# rollback;
ROLLBACK
host.domain=# begin;
BEGIN
host.domain=# update foo set foo_type_id = 3 where foo_id=200000234;
UPDATE 1
host.domain=# rollback;
ROLLBACK
host.domain=# \q

[ \ /
[ >X< Christian Fowler | spider(at)viovio(dot)com
[ / \ http://www.viovio.com | http://www.tikipro.org

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2004-10-17 19:38:25 Re: set AUTOCOMMIT OFF in psqlrc not having affect
Previous Message Larry Lennhoff 2004-10-17 11:22:16 Re: Suppressing duplicate key error messages in