Michael Fuhr <mike@fuhr.org> writes:
> PQdb() is returning NULL, which causes fprintf() to dump core.
It is actually documented that a failed connection might return NULL for
this, so the example code is wrong. I've corrected the examples to not
assume PQdb can be used on a failed connection.
pg_dump was doing it wrong too :-(
regards, tom lane