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.
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.

xinzweb/gpdb,edespino/gpdb,adam8157/gpdb,yazun/postgres-xl,adam8157/gpdb,xinzweb/gpdb,ashwinstar/gpdb,lisakowen/gpdb,edespino/gpdb,kmjungersen/PostgresXL,ovr/postgres-xl,lisakowen/gpdb,lisakowen/gpdb,50wu/gpdb,oberstet/postgres-xl,arcivanov/postgres-xl,adam8157/gpdb,techdragon/Postgres-XL,xinzweb/gpdb,jmcatamney/gpdb,edespino/gpdb,Chibin/gpdb,Postgres-XL/Postgres-XL,lisakowen/gpdb,ovr/postgres-xl,edespino/gpdb,xinzweb/gpdb,jmcatamney/gpdb,jmcatamney/gpdb,oberstet/postgres-xl,tpostgres-projects/tPostgres,yuanzhao/gpdb,lisakowen/gpdb,ovr/postgres-xl,pavanvd/postgres-xl,jmcatamney/gpdb,50wu/gpdb,yuanzhao/gpdb,yazun/postgres-xl,Chibin/gpdb,tpostgres-projects/tPostgres,50wu/gpdb,postmind-net/postgres-xl,yuanzhao/gpdb,50wu/gpdb,Postgres-XL/Postgres-XL,oberstet/postgres-xl,pavanvd/postgres-xl,jmcatamney/gpdb,kmjungersen/PostgresXL,arcivanov/postgres-xl,kmjungersen/PostgresXL,postmind-net/postgres-xl,ashwinstar/gpdb,Chibin/gpdb,zeroae/postgres-xl,ashwinstar/gpdb,yuanzhao/gpdb,kmjungersen/PostgresXL,greenplum-db/gpdb,techdragon/Postgres-XL,ashwinstar/gpdb,postmind-net/postgres-xl,jmcatamney/gpdb,postmind-net/postgres-xl,ashwinstar/gpdb,snaga/postgres-xl,50wu/gpdb,arcivanov/postgres-xl,kmjungersen/PostgresXL,oberstet/postgres-xl,yuanzhao/gpdb,Chibin/gpdb,snaga/postgres-xl,lisakowen/gpdb,adam8157/gpdb,Postgres-XL/Postgres-XL,arcivanov/postgres-xl,xinzweb/gpdb,zeroae/postgres-xl,greenplum-db/gpdb,zeroae/postgres-xl,lisakowen/gpdb,Chibin/gpdb,Postgres-XL/Postgres-XL,ovr/postgres-xl,edespino/gpdb,arcivanov/postgres-xl,tpostgres-projects/tPostgres,ovr/postgres-xl,yazun/postgres-xl,jmcatamney/gpdb,50wu/gpdb,yazun/postgres-xl,yuanzhao/gpdb,yazun/postgres-xl,yuanzhao/gpdb,Chibin/gpdb,greenplum-db/gpdb,edespino/gpdb,greenplum-db/gpdb,adam8157/gpdb,lisakowen/gpdb,greenplum-db/gpdb,snaga/postgres-xl,techdragon/Postgres-XL,tpostgres-projects/tPostgres,greenplum-db/gpdb,snaga/postgres-xl,pavanvd/postgres-xl,greenplum-db/gpdb,ashwinstar/gpdb,edespino/gpdb,oberstet/postgres-xl,Chibin/gpdb,yuanzhao/gpdb,Chibin/gpdb,arcivanov/postgres-xl,xinzweb/gpdb,adam8157/gpdb,ashwinstar/gpdb,pavanvd/postgres-xl,Postgres-XL/Postgres-XL,edespino/gpdb,snaga/postgres-xl,xinzweb/gpdb,techdragon/Postgres-XL,50wu/gpdb,yuanzhao/gpdb,50wu/gpdb,adam8157/gpdb,edespino/gpdb,Chibin/gpdb,yuanzhao/gpdb,Chibin/gpdb,ashwinstar/gpdb,jmcatamney/gpdb,tpostgres-projects/tPostgres,xinzweb/gpdb,zeroae/postgres-xl,postmind-net/postgres-xl,zeroae/postgres-xl,greenplum-db/gpdb,adam8157/gpdb,edespino/gpdb,techdragon/Postgres-XL,pavanvd/postgres-xl