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

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

Commit: 7eb9f613c3fdc33b2ea19177e7e0b210f38f194c
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2008-08-16T02:25:38Z
Releases: 7.4.22
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 +2 −4