psql + autocommit - Mailing list pgsql-general

From John Sidney-Woollett
Subject psql + autocommit
Date
Msg-id 41484F76.1060705@wardbrook.com
Whole thread Raw
Responses Re: psql + autocommit  (Peter Eisentraut <peter_e@gmx.net>)
Re: psql + autocommit  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
With the advent of postgres v8, would it be possible to change the
default behaviour of psql from AUTOCOMMIT=ON to AUTOCOMMIT=OFF ?

Although this might break backward compatibility, it might be acceptable
on the basis that v8 is such a major release.

Also adding a new command line parameter to control the AUTOCOMMIT
setting for those users that will experience broken scripts executed
(especially using the -c command) might help ease the pain, since they
would only have to add a new switch to their existing scripts, or
explictly set the AUTOCOMMIT variable in their scripts. Otherwise they
could add a final COMMIT at the end of the script.

In Oracle's SQLPlus, AUTOCOMMIT=OFF is the default behaviour and is (in
my view) preferable to the current situation.

I know the AUTOCOMMIT can be set in an active session, but I sometimes
forget leading to an un-rollback-able data loss/damage. Using the
.psqlrc file can lead to inconsistancies between different accounts
where some have the setting defined and others don't.

The final reason for doing so would be to closer to the SQL spec.

John Sidney-Woollett

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Checking regex pattern validity
Next
From: Vic Cekvenich
Date:
Subject: OS X Mac pgAdmin equivalent?