pg_result_status() alternative?

Qian Xu quian.xu at
Thu Jan 8 08:41:27 CET 2009

Gerhard Häring wrote:
> What are you testing, really? "Normal" Python code should use a
> PostgreSQL DB-API module or a wrapper on top of it, like SQLAlchemy.
> Generally, you shouldn't have to drop down to protocol-level functions,
> unless you're developing a PostgreSQL adapter yourself.
> Care to explain why you're messing around with this low-level functions?

I am using pgpool (a middleware that works between PostgreSQL servers and a
PostgreSQL database client. for
data republication. And it works not stable. Sometimes it crashes after
couple of weeks. So I want to test. whether the pgpool behaviors correctly.

I performed same queries to a real postgresql database and to a pgpool by
using the pg module ( Same query results
and same frontend/backend protocol responses are expected.
1. There is no problem to compare the query results.
2. There is no problem to retrieve the protocol responses of pgpool (by
calling an API of pgpool) as well.
3. But I have problem to retrieve the protocol responses of a real
postgresql database.

This is my motivation of using the low-level function.


More information about the Python-list mailing list