psql + autocommit

From: John Sidney-Woollett <johnsw(at)wardbrook(dot)com>
To: postgres general <pgsql-general(at)postgresql(dot)org>
Subject: psql + autocommit
Date: 2004-09-15 14:19:34
Message-ID: 41484F76.1060705@wardbrook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Vic Cekvenich 2004-09-15 14:21:36 OS X Mac pgAdmin equivalent?
Previous Message Leonardo Francalanci 2004-09-15 14:10:29 what is flushed?