Get status of connection (C) - Mailing list pgsql-general

From zilch@home.se
Subject Get status of connection (C)
Date
Msg-id 20010529114622.A12839@loony
Whole thread Raw
List pgsql-general
I'm writing a pool manager to manage x connections to a pgsql postmaster.

The getConnection method has to check if the connection is still valid,
and try to reconnect if it ain't.

Do you guys have a good way of doing this?

Can I use PQstatus?

Should I make a little runCommand on it to try it out? Then what command?

If it's bad, should I run a PQfinish on it before reconnecting or not?

Thank you plenty!

---
Daniel Akerud

pgsql-general by date:

Previous
From: Denis Gasparin
Date:
Subject: Re: Kylix, dbexpress & PostgreSql
Next
From: "Karen Ellrick"
Date:
Subject: Problems with new data location