Fix pg_dump/pg_restore's ExecuteSqlCommand() to behave suitably if PQexec

Tom Lane <tgl@sss.pgh.pa.us>

Commit: 7ee27d49df675145e0e755c4028100ad3c8f1c9e
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2008-08-16T02:25:06Z
Releases: 8.4.0
Fix pg_dump/pg_restore's ExecuteSqlCommand() to behave suitably if PQexec
returns NULL instead of a PGresult.  The former coding would fail, which
is OK, but it neglected to give you the PQerrorMessage that might tell
you why.  In the oldest branches, there was another problem: it'd sometimes
report PQerrorMessage from the wrong connection.

Files

PathChange+/−
src/bin/pg_dump/pg_backup_db.c modified +23 −34