Lists: | pgsql-bugs |
---|
From: | Olleg <olleg(at)telecom(dot)mipt(dot)ru> |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org |
Subject: | Autocomit off in psql don't work |
Date: | 2003-12-03 07:57:25 |
Message-ID: | 3FCD9765.8020701@telecom.mipt.ru |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-bugs |
SuSE Linux 8.2 (i586)
PostgreSQL REL7_4_STABLE (cvs), 7.4
compiled with:
gcc (GCC) 3.3 20030226 (prerelease) (SuSE Linux)
flex version 2.5.4
bison (GNU Bison) 1.875
PostgreSQL config.status 7.4
configured by ./configure, generated by GNU Autoconf 2.53,
with options "'--prefix=/opt/pgsql' '--enable-integer-datetimes'
'--enable-thread-safety' '--disable-largefile' '--with-java'
'--with-pam' '--with-openss' '--with-gnu-ld'"
To repeat:
$ /opt/pgsql/bin/psql
Welcome to psql 7.4, 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
olleg=# \set
VERSION = 'PostgreSQL 7.4 on i686-pc-linux-gnu, compiled by GCC gcc
(GCC) 3.3 20030226 (prerelease) (SuSE Linux)'
AUTOCOMMIT = 'on'
VERBOSITY = 'default'
DBNAME = 'olleg'
USER = 'olleg'
PORT = '5432'
ENCODING = 'KOI8'
PROMPT1 = '%/%R%# '
PROMPT2 = '%/%R%# '
PROMPT3 = '>> '
HISTSIZE = '500'
olleg=# \set AUTOCOMMIT OFF
olleg=# \set
VERSION = 'PostgreSQL 7.4 on i686-pc-linux-gnu, compiled by GCC gcc
(GCC) 3.3 20030226 (prerelease) (SuSE Linux)'
AUTOCOMMIT = 'OFF'
VERBOSITY = 'default'
DBNAME = 'olleg'
USER = 'olleg'
PORT = '5432'
ENCODING = 'KOI8'
PROMPT1 = '%/%R%# '
PROMPT2 = '%/%R%# '
PROMPT3 = '>> '
HISTSIZE = '500'
olleg=# begin;
BEGIN
olleg=# select now();
now
-------------------------------
2003-11-28 18:15:59.063438+03
(1 row)
olleg=# select now();
now
-------------------------------
2003-11-28 18:15:59.063438+03
(1 row)
olleg=# commit;
COMMIT
olleg=# select now();
now
-------------------------------
2003-11-28 18:16:42.484651+03
(1 row)
olleg=# select now();
now
-------------------------------
2003-11-28 18:16:43.085406+03
(1 row)
olleg=# commit;
WARNING: there is no transaction in progress
COMMIT
--
Olleg
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Olleg <olleg(at)jane(dot)telecom(dot)mipt(dot)ru> |
Cc: | pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: Autocomit off in psql don't work |
Date: | 2003-12-03 16:00:06 |
Message-ID: | 280.1070467206@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-bugs |
Olleg <olleg(at)jane(dot)telecom(dot)mipt(dot)ru> writes:
> olleg=# \set AUTOCOMMIT OFF
It has to be
\set AUTOCOMMIT off
Not sure if we should be more flexible about this or not. The code says
/*
* for backwards compatibility, anything except "off" is taken as
* "true"
*/
regards, tom lane
From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Olleg <olleg(at)jane(dot)telecom(dot)mipt(dot)ru>, pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: Autocomit off in psql don't work |
Date: | 2003-12-04 12:23:06 |
Message-ID: | 200312041223.hB4CN6r23129@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-bugs |
Tom Lane wrote:
> Olleg <olleg(at)jane(dot)telecom(dot)mipt(dot)ru> writes:
> > olleg=# \set AUTOCOMMIT OFF
>
> It has to be
>
> \set AUTOCOMMIT off
>
> Not sure if we should be more flexible about this or not. The code says
>
> /*
> * for backwards compatibility, anything except "off" is taken as
> * "true"
> */
That seems pretty strange to me. Is this a TODO?
--
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