[PyGreSQL] error handling

Christoph Zwerschke cito at online.de
Mon Dec 1 01:58:05 EST 2008


raf schrieb:
  > are there any plans to add the optional
> error handling parts of the dbi to pygresql?
> currently, the output of a raise statement
> is output to stdout or similar. is pygresql
> doing that or libpq?

You mean the "errorhandler" and "messages" attributes? That's already on 
our whishlist and we may consider this after version 4.0 is out (which 
is available as beta and considered in feature freeze mode now). On a 
similar note, we also want to implement accessing SQLSTATE error codes 
and notice handling with PQsetNoticeReceiver/PQsetNoticeProcessor.

Libpq errors are not printed to stdout, only the usual Postgres log 
messages. PyGreSQL does not print them to stdout either, it only raises 
them as appropriate Python errors (as defined in DB-API).

-- Christoph


More information about the PyGreSQL mailing list