[tpop3d-discuss]Database connection

Daniel Tiefnig tpop3d at inode.at
Wed, 30 Nov 2005 18:21:07 +0100

ohp@pyrenet.fr wrote:
> My understanding is that auth_pgsql_init has to be called at drivers
> init time to save the parametrized queries.

That's true, and beside that it opens a connection to the database.

> Of course, I could wipe db connection off and put it in an other
> function, but that would mean a second pace to read conf file..

I think you misunderstood the functionality of PQreset(). From the manual:
"[PQreset] will close the connection to the server and attempt to
reestablish a new connection to the same server, using all the same
parameters previously used."
So, there's no need to establish a new connection after PQreset(), as
PQreset() should have allready done that.