I'm using libpgtcl with PostgreSQL-7.2.3. There is a discrepancy between
authorBruce Momjian
Fri, 8 Nov 2002 04:56:40 +0000 (04:56 +0000)
committerBruce Momjian
Fri, 8 Nov 2002 04:56:40 +0000 (04:56 +0000)
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

doc/src/sgml/libpgtcl.sgml

index 6ff9e6bebcf817633948f30903c3a9dadce858f1..df0c8b641a4658421941d0ac30d93ef95e234eb8 100644 (file)
@@ -712,7 +712,7 @@ the connection that produced the result.
 
 
 if the command was an INSERT, the OID of the 
-inserted tuple; otherwise an empty string.
+inserted tuple; otherwise 0.