Simplify pg_result by using new libpq PQresultErrorMessage; fix some memory leaks in pg_select.
Simplify pg_result by using new libpq PQresultErrorMessage;
fix some memory leaks in pg_select.

kaknikhil/gpdb,kaknikhil/gpdb,kaknikhil/gpdb,ashwinstar/gpdb,janebeckman/gpdb,randomtask1155/gpdb,rubikloud/gpdb,greenplum-db/gpdb,snaga/postgres-xl,atris/gpdb,techdragon/Postgres-XL,yuanzhao/gpdb,CraigHarris/gpdb,yuanzhao/gpdb,randomtask1155/gpdb,lisakowen/gpdb,greenplum-db/gpdb,royc1/gpdb,chrishajas/gpdb,lisakowen/gpdb,adam8157/gpdb,arcivanov/postgres-xl,lintzc/gpdb,lpetrov-pivotal/gpdb,royc1/gpdb,xuegang/gpdb,rvs/gpdb,xuegang/gpdb,0x0FFF/gpdb,jmcatamney/gpdb,kmjungersen/PostgresXL,Chibin/gpdb,0x0FFF/gpdb,CraigHarris/gpdb,randomtask1155/gpdb,cjcjameson/gpdb,foyzur/gpdb,Quikling/gpdb,royc1/gpdb,randomtask1155/gpdb,kaknikhil/gpdb,edespino/gpdb,rubikloud/gpdb,kmjungersen/PostgresXL,snaga/postgres-xl,edespino/gpdb,xinzweb/gpdb,ashwinstar/gpdb,rubikloud/gpdb,foyzur/gpdb,rvs/gpdb,jmcatamney/gpdb,Quikling/gpdb,oberstet/postgres-xl,randomtask1155/gpdb,cjcjameson/gpdb,lpetrov-pivotal/gpdb,pavanvd/postgres-xl,ashwinstar/gpdb,ovr/postgres-xl,lintzc/gpdb,janebeckman/gpdb,xinzweb/gpdb,atris/gpdb,kaknikhil/gpdb,50wu/gpdb,Chibin/gpdb,Postgres-XL/Postgres-XL,royc1/gpdb,ashwinstar/gpdb,50wu/gpdb,xuegang/gpdb,kaknikhil/gpdb,techdragon/Postgres-XL,zaksoup/gpdb,rubikloud/gpdb,Postgres-XL/Postgres-XL,pavanvd/postgres-xl,tangp3/gpdb,ovr/postgres-xl,ashwinstar/gpdb,lisakowen/gpdb,greenplum-db/gpdb,postmind-net/postgres-xl,greenplum-db/gpdb,cjcjameson/gpdb,lisakowen/gpdb,Chibin/gpdb,zaksoup/gpdb,snaga/postgres-xl,edespino/gpdb,janebeckman/gpdb,edespino/gpdb,adam8157/gpdb,lintzc/gpdb,lintzc/gpdb,adam8157/gpdb,0x0FFF/gpdb,0x0FFF/gpdb,chrishajas/gpdb,50wu/gpdb,janebeckman/gpdb,pavanvd/postgres-xl,cjcjameson/gpdb,arcivanov/postgres-xl,adam8157/gpdb,arcivanov/postgres-xl,lintzc/gpdb,yazun/postgres-xl,zeroae/postgres-xl,techdragon/Postgres-XL,chrishajas/gpdb,oberstet/postgres-xl,CraigHarris/gpdb,cjcjameson/gpdb,zaksoup/gpdb,janebeckman/gpdb,janebeckman/gpdb,50wu/gpdb,randomtask1155/gpdb,rvs/gpdb,Quikling/gpdb,rubikloud/gpdb,postmind-net/postgres-xl,randomtask1155/gpdb,foyzur/gpdb,janebeckman/gpdb,Quikling/gpdb,Postgres-XL/Postgres-XL,yuanzhao/gpdb,Quikling/gpdb,zaksoup/gpdb,Chibin/gpdb,tangp3/gpdb,0x0FFF/gpdb,chrishajas/gpdb,atris/gpdb,pavanvd/postgres-xl,atris/gpdb,Postgres-XL/Postgres-XL,xuegang/gpdb,yuanzhao/gpdb,foyzur/gpdb,ahachete/gpdb,zaksoup/gpdb,yazun/postgres-xl,xinzweb/gpdb,lpetrov-pivotal/gpdb,chrishajas/gpdb,CraigHarris/gpdb,kaknikhil/gpdb,cjcjameson/gpdb,greenplum-db/gpdb,rvs/gpdb,kaknikhil/gpdb,adam8157/gpdb,tpostgres-projects/tPostgres,Chibin/gpdb,Quikling/gpdb,zeroae/postgres-xl,tangp3/gpdb,50wu/gpdb,arcivanov/postgres-xl,lintzc/gpdb,ahachete/gpdb,Chibin/gpdb,yuanzhao/gpdb,rvs/gpdb,cjcjameson/gpdb,lpetrov-pivotal/gpdb,royc1/gpdb,janebeckman/gpdb,jmcatamney/gpdb,oberstet/postgres-xl,greenplum-db/gpdb,tpostgres-projects/tPostgres,janebeckman/gpdb,lpetrov-pivotal/gpdb,lpetrov-pivotal/gpdb,tangp3/gpdb,lintzc/gpdb,ashwinstar/gpdb,ashwinstar/gpdb,ahachete/gpdb,zeroae/postgres-xl,chrishajas/gpdb,foyzur/gpdb,snaga/postgres-xl,snaga/postgres-xl,postmind-net/postgres-xl,royc1/gpdb,jmcatamney/gpdb,edespino/gpdb,ahachete/gpdb,yuanzhao/gpdb,50wu/gpdb,kaknikhil/gpdb,xinzweb/gpdb,CraigHarris/gpdb,kmjungersen/PostgresXL,xuegang/gpdb,Quikling/gpdb,greenplum-db/gpdb,lisakowen/gpdb,pavanvd/postgres-xl,ahachete/gpdb,CraigHarris/gpdb,rubikloud/gpdb,rubikloud/gpdb,xinzweb/gpdb,yuanzhao/gpdb,ovr/postgres-xl,CraigHarris/gpdb,tangp3/gpdb,kmjungersen/PostgresXL,tpostgres-projects/tPostgres,adam8157/gpdb,zeroae/postgres-xl,zaksoup/gpdb,chrishajas/gpdb,tpostgres-projects/tPostgres,royc1/gpdb,foyzur/gpdb,Chibin/gpdb,kmjungersen/PostgresXL,zaksoup/gpdb,xinzweb/gpdb,0x0FFF/gpdb,ashwinstar/gpdb,adam8157/gpdb,edespino/gpdb,0x0FFF/gpdb,xuegang/gpdb,yuanzhao/gpdb,janebeckman/gpdb,chrishajas/gpdb,ahachete/gpdb,jmcatamney/gpdb,zaksoup/gpdb,adam8157/gpdb,50wu/gpdb,CraigHarris/gpdb,zeroae/postgres-xl,CraigHarris/gpdb,yazun/postgres-xl,yuanzhao/gpdb,kaknikhil/gpdb,randomtask1155/gpdb,lisakowen/gpdb,xinzweb/gpdb,lpetrov-pivotal/gpdb,Chibin/gpdb,edespino/gpdb,rubikloud/gpdb,50wu/gpdb,jmcatamney/gpdb,Quikling/gpdb,postmind-net/postgres-xl,rvs/gpdb,lintzc/gpdb,postmind-net/postgres-xl,Quikling/gpdb,techdragon/Postgres-XL,cjcjameson/gpdb,ovr/postgres-xl,ahachete/gpdb,atris/gpdb,atris/gpdb,lisakowen/gpdb,rvs/gpdb,rvs/gpdb,Chibin/gpdb,yazun/postgres-xl,ovr/postgres-xl,xuegang/gpdb,foyzur/gpdb,oberstet/postgres-xl,lisakowen/gpdb,Postgres-XL/Postgres-XL,tpostgres-projects/tPostgres,edespino/gpdb,royc1/gpdb,tangp3/gpdb,arcivanov/postgres-xl,rvs/gpdb,arcivanov/postgres-xl,Chibin/gpdb,0x0FFF/gpdb,oberstet/postgres-xl,atris/gpdb,Quikling/gpdb,lpetrov-pivotal/gpdb,edespino/gpdb,techdragon/Postgres-XL,tangp3/gpdb,xuegang/gpdb,xinzweb/gpdb,yazun/postgres-xl,cjcjameson/gpdb,rvs/gpdb,cjcjameson/gpdb,tangp3/gpdb,greenplum-db/gpdb,jmcatamney/gpdb,jmcatamney/gpdb,yuanzhao/gpdb,xuegang/gpdb,lintzc/gpdb,ahachete/gpdb,edespino/gpdb,atris/gpdb,foyzur/gpdb