turning off autocommit behavior in psql

From: David Van Wie <vanwie(at)cryptio(dot)net>
To: pgsql-hackers(at)postgresql(dot)org
Subject: turning off autocommit behavior in psql
Date: 2002-08-22 16:38:01
Message-ID: 20020822093642.Q48130-200000@radix.cryptio.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

I've been using postgres for a little over a year now, and overall I've
been very pleased with it. Thanks!

The psql client is really nice, but I was frustrated by the lack of a
"no-autocommit" mode. So, I made a few small modifications to the client
to wrap everything in a transaction block automatically. I've been using
it locally for a while, and it seems to work alright. The patch is
attached (it's a patch to the 7.2.1 branch).

Do other people think this is a useful feature?

The one thing that I don't like about the patch, but that I'm not sure how
to handle, is telling the user that one transaction has ended and another
has begun. Currently, I am just printing NOTICE messages ("NOTICE:
aborting current transaction and beginning a new one", for example) but
this seems wrong, since the messages aren't coming from the backend.
Suggestions on how to handle this?

...dave

Attachment Content-Type Size
no-auto-commit.diff text/plain 4.8 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2002-08-22 16:59:16 Re: turning off autocommit behavior in psql
Previous Message Thomas O'Connell 2002-08-22 16:05:49 recent security activity