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:11 +0000 (02:25 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Sat, 16 Aug 2008 02:25:11 +0000 (02:25 +0000)
commit4dff669cf0b999bf57c29d2cd43df562a7b70e82
tree7275bc4c9a0ccde54727863bd934fea61635ebf6
parent36985c52f4636f30b7d71759828fb238bd2dd3a4
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