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

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search archives
  Advanced Search

Re: PL/pgSQL equivalent to PQtransactionStatus?


  • From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
  • To: Christophe <xof(at)thebuild(dot)com>
  • Cc: PostgreSQL <pgsql-general(at)postgresql(dot)org>
  • Subject: Re: PL/pgSQL equivalent to PQtransactionStatus?
  • Date: Thu, 31 Jul 2008 15:38:08 -0400
  • Message-id: <20080731193808.GJ8497@alvh.no-ip.org> <text/plain>

Christophe wrote:
>
> On Jul 31, 2008, at 11:49 AM, Alvaro Herrera wrote:
>> Why does it matter?
>
> I'm attempting to "clean out" a connection that is in an unknown state 
> (along the lines of what pgpool does when reusing an open connection).  
> Of course, I could just fire an ABORT down, but it seems nicer to avoid 
> doing so if no transaction block is open.

Maybe DISCARD ALL does what you want?

http://www.postgresql.org/docs/8.3/static/sql-discard.html

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.



Home | Main Index | Thread Index

Privacy Policy | About PostgreSQL
Copyright © 1996 – 2012 PostgreSQL Global Development Group