Re: TODO: Add a GUC to control whether BEGIN inside - Mailing list pgsql-hackers

From Tom Lane
Subject Re: TODO: Add a GUC to control whether BEGIN inside
Date
Msg-id 5932.1167759205@sss.pgh.pa.us
Whole thread Raw
In response to Re: TODO: Add a GUC to control whether BEGIN inside  (Lukas Kahwe Smith <smith@pooteeweet.org>)
Responses Re: TODO: Add a GUC to control whether BEGIN inside
Re: TODO: Add a GUC to control whether BEGIN inside
Re: TODO: Add a GUC to control whether BEGIN inside
List pgsql-hackers
Lukas Kahwe Smith <smith@pooteeweet.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


pgsql-hackers by date:

Previous
From: "Joshua D. Drake"
Date:
Subject: Re: TODO: Add a GUC to control whether BEGIN inside
Next
From: Jeff Davis
Date:
Subject: Re: Sync Scan update