Re: Reset? - Mailing list pgsql-interfaces

From jtv
Subject Re: Reset?
Date
Msg-id 20020315035944.C24687@xs4all.nl
Whole thread Raw
In response to Reset?  (Joep deVocht <joep@masktools.com>)
List pgsql-interfaces
On Thu, Mar 14, 2002 at 10:04:40AM -0800, Joep deVocht wrote:
> 
> I know it's possible to "reset" the connection or something similar,
> so that after an invalid query, new queries can be sent 
> without problems. I know this because "psql" is able to.
> Problem is that I can't seem to figure out how they do it.

There is a function in libpq (which libpq++ is built on top of), called
PQreset().  Unless I'm mistaken, libpq++ doesn't currently expose this 
in its API (the alternative libpqxx currently makes it a private method, 
see my home page below).

There's a brief description of PQreset() at:

http://www.us.postgresql.org/users-lounge/docs/7.2/postgres/libpq-connect.html

I have no idea whether resetting the connection will solve your problem
though.  Going by the docs, the function is there mainly to let you
recover broken connections.


Jeroen

http://members.ams.chello.nl/j.vermeulen31/



pgsql-interfaces by date:

Previous
From: Joep deVocht
Date:
Subject: Reset?
Next
From: Michael Meskes
Date:
Subject: Re: ecpg weird behavior