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

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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Lukas Kahwe Smith <smith(at)pooteeweet(dot)org>
Cc: Alvaro Herrera <alvherre(at)commandprompt(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: TODO: Add a GUC to control whether BEGIN inside
Date: 2007-01-02 17:33:25
Message-ID: 5932.1167759205@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
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");

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Jeff DavisDate: 2007-01-02 17:48:22
Subject: Re: Sync Scan update
Previous:From: Joshua D. DrakeDate: 2007-01-02 17:26:05
Subject: Re: TODO: Add a GUC to control whether BEGIN inside

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