Re: PQprepare in PostgreSQL 7.4 (lack of SAVEPOINTs) - Mailing list pgsql-general

From Konstantin Izmailov
Subject Re: PQprepare in PostgreSQL 7.4 (lack of SAVEPOINTs)
Date
Msg-id AANLkTin3396EJCArJNqiv8ULKC14Z3yGCibh-oDsCXH-@mail.gmail.com
Whole thread Raw
In response to Re: PQprepare in PostgreSQL 7.4 (lack of SAVEPOINTs)  (Scott Marlowe <scott.marlowe@gmail.com>)
Responses Re: PQprepare in PostgreSQL 7.4 (lack of SAVEPOINTs)  (Scott Marlowe <scott.marlowe@gmail.com>)
List pgsql-general
Scott, thank you for the quick answer!
 
I think it would work if our software tracks which statements have already been prepared on the connection.

 
On Wed, Jun 23, 2010 at 8:25 PM, Scott Marlowe <scott.marlowe@gmail.com> wrote:
On Wed, Jun 23, 2010 at 10:55 PM, Konstantin Izmailov <pgfizm@gmail.com> wrote:
> Is there a way to prevent transaction abort when preparing command in
> version 7.4?
>
> I googled but haven't been able to find the answer. The issue occurs when
> our software trys to prepare a command that is already prepared (by the same
> or different app). PQprepare returns error and aborts current transaction.
> The company is not willing to upgrade from 7.4 to a later version due to
> risk.
>
> SAVEPOINTs are not available in v.7.4. I'm looking at PQdescribePrepared
> function. What is the right solution?

Upgrading to a later version of pgsql, or don't issue that command
twice in a transaction.

The risk of upgrading is less than the risk of staying on an
unsupported version of pgsql.  The company that won't upgrade is
making a poorly informed decision.

pgsql-general by date:

Previous
From: Craig Ringer
Date:
Subject: Re: copy/duplicate database schemas
Next
From: Tom Lane
Date:
Subject: Re: Fwd: Stalled post to pgsql-es-ayuda