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

From Jaime Casanova
Subject Re: TODO: Add a GUC to control whether BEGIN inside
Date
Msg-id c2d9e70e0701031742y7046407eu6e46b84a02afb6bf@mail.gmail.com
Whole thread Raw
In response to Re: TODO: Add a GUC to control whether BEGIN inside  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 1/2/07, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> 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
>

and  how the releases and commit will happen? all at once or one by one?

-- 
regards,
Jaime Casanova

"Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs and the universe trying
to produce bigger and better idiots.
So far, the universe is winning."                                      Richard Cook


pgsql-hackers by date:

Previous
From: Jim Nasby
Date:
Subject: Re: TODO: Add a GUC to control whether BEGIN inside
Next
From: Euler Taveira de Oliveira
Date:
Subject: Re: [PATCHES] xlog directory at initdb time