Fix pg_dump/pg_restore's ExecuteSqlCommand() to behave suitably if PQexec
Tom Lane <tgl@sss.pgh.pa.us>
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
| Path | Change | +/− |
|---|---|---|
| src/bin/pg_dump/pg_backup_db.c | modified | +23 −34 |