Fix pg_dump/pg_restore's ExecuteSqlCommand() to behave suitably if PQexec
authorTom Lane <tgl@sss.pgh.pa.us>
Sat, 16 Aug 2008 02:25:17 +0000 (02:25 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Sat, 16 Aug 2008 02:25:17 +0000 (02:25 +0000)
commit8ca6a92ae044f10e39531983519b754f4ab4e8e5
treeb49376eda7f8557ddba2d00847eef054bb52202d
parentf44f0ea87cf2a8c9b8b2bc250c92133e048f7c0c
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.
src/bin/pg_dump/pg_backup_db.c