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

Re: TODO: Add a GUC to control whether BEGIN inside

From: Lukas Kahwe Smith <smith(at)pooteeweet(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: TODO: Add a GUC to control whether BEGIN inside
Date: 2007-01-02 19:01:57
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Tom Lane wrote:
> Lukas Kahwe Smith <smith(at)pooteeweet(dot)org> writes:
>> Err, I think you misunderstood what I said. My implementation uses 
>> SAVEPOINTs already. The point is having some API where you do not have 
>> to care of you are already in a transaction or not.
> It's not that hard, is it?
> 	if (PQtransactionStatus(conn) == PQTRANS_IDLE)
> 		PQexec(conn, "BEGIN");
> 	else
> 		PQexec(conn, "SAVEPOINT foo");

Its not exactly convenient either, especially in the case of modular 
code that may be developed by different people. Anyways, like I said I 
have a solution in my framework to make life of module developers 
easier. Obviously proper nested transactions would be the ideal, but so 
it goes. I was just throwing this out here when I saw Peter's comment.


In response to


pgsql-hackers by date

Next:From: David BorehamDate: 2007-01-02 19:02:40
Subject: Re: TODO: GNU TLS
Previous:From: Bruce MomjianDate: 2007-01-02 19:00:27
Subject: Re: [PATCHES] xlog directory at initdb time

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