dbTalk Databases Forums  

[BUGS] Autocomit off in psql don't work

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss [BUGS] Autocomit off in psql don't work in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Olleg
 
Posts: n/a

Default [BUGS] Autocomit off in psql don't work - 12-03-2003 , 02:01 AM






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




---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

Reply With Quote
  #2  
Old   
Tom Lane
 
Posts: n/a

Default Re: [BUGS] Autocomit off in psql don't work - 12-03-2003 , 10:08 AM






Olleg <olleg (AT) jane (DOT) telecom.mipt.ru> writes:
Quote:
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

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend


Reply With Quote
  #3  
Old   
Bruce Momjian
 
Posts: n/a

Default Re: [BUGS] Autocomit off in psql don't work - 12-04-2003 , 06:27 AM



Tom Lane wrote:
Quote:
Olleg <olleg (AT) jane (DOT) telecom.mipt.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.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.