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

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

Commit: 7e9308544f041cf59e0dd4916fe93fee9aa91f99
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2008-08-16T02:25:23Z
Releases: 8.1.14
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 +15 −13