Refactor pg_dump.c to avoid duplicating returns-one-row check.
Refactor pg_dump.c to avoid duplicating returns-one-row check.

Any patches apt to get broken have probably already been broken by the
error-handling cleanups I just did, so we might as well clean this up
at the same time.

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