I'm using libpgtcl with PostgreSQL-7.2.3. There is a discrepancy between the documentation and behavior of "pg_result $res -oid" when $res is not from an INSERT.  The documentation says it should return an empty string, but in fact it returns 0. I think it used to return an empty string around PostgreSQL-7.1.3 when PQoidStatus() was used, but now it uses PQoidValue() which returns InvalidOid, 0 in this case.
I'm using libpgtcl with PostgreSQL-7.2.3. There is a discrepancy between
the documentation and behavior of "pg_result $res -oid" when $res is not
from an INSERT.  The documentation says it should return an empty
string, but in fact it returns 0. I think it used to return an empty
string around PostgreSQL-7.1.3 when PQoidStatus() was used, but now it
uses PQoidValue() which returns InvalidOid, 0 in this case.

Assuming the current behavior is desired, here is a patch to the
documentation doc/src/sgml/libpgtcl.sgml to match what really happens:


ljb

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