Skip site navigation (1) Skip section navigation (2)

Re: turning off autocommit behavior in psql

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: David Van Wie <vanwie(at)cryptio(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: turning off autocommit behavior in psql
Date: 2002-08-31 05:42:11
Message-ID: 200208310542.g7V5gB429477@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
Tom Lane has applied this patch and merged it into our code.  Thanks.

---------------------------------------------------------------------------

David Van Wie wrote:
> On Thu, 22 Aug 2002, Tom Lane wrote:
> 
> > I believe our intention has been to modify the backend to offer that
> > behavior (with a GUC variable to turn it on or off).  Supporting it
> > only in psql doesn't seem the way to go.
> 
> After playing around with the transaction code for a while, I think I have
> a reasonable idea of how to do this in the backend. This is my first time
> working with the backend code, so it's entirely possible that I'm going
> about this completely wrong, but the change seems to work and pass
> regression tests.
> 
> I added a GUC variable "autocommit" which defaults to true. (Current
> behavior). When it is set to false, the backend should begin a transaction
> block if it is not inside one when executing any command. I did this by
> changing StartTransactionCommand() in backend/access/transam/xact.c to
> call BeginTransactionBlock() after StartTransaction() if it is not
> currently in a transaction block.
> 
> Does this sound like a reasonable approach?
> 
> My first attempt at a patch (to current cvs source) is attached.
> 
> ...dave

Content-Description: 

[ Attachment, skipping... ]

> 
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org

-- 
  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

In response to

pgsql-hackers by date

Next:From: Alvaro HerreraDate: 2002-08-31 05:52:59
Subject: Re: [HACKERS] pg_attribute.attisinherited ?
Previous:From: Joe ConwayDate: 2002-08-31 02:24:09
Subject: Re: [7.3-devl] Timezones on RH 7.3 and Null

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group