Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 0E371475A1E for ; Wed, 6 Nov 2002 20:26:50 -0500 (EST) Received: from news.hub.org (news.hub.org [64.49.215.80]) by postgresql.org (Postfix) with ESMTP id A3D15475461 for ; Wed, 6 Nov 2002 20:26:49 -0500 (EST) Received: by news.hub.org (Postfix, from userid 8) id A06E5381633; Wed, 6 Nov 2002 20:26:47 -0500 (EST) From: ljb X-Newsgroups: comp.databases.postgresql.interfaces Subject: pgtcl: Change in behavior of pg_result -oid, vs documentation Date: Thu, 7 Nov 2002 01:26:46 +0000 (UTC) Organization: Hub.Org Networking Services (http://www.hub.org) Lines: 22 Message-ID: X-Complaints-To: usenet@news.hub.org User-Agent: slrn/0.9.7.3 (Linux) To: pgsql-interfaces@postgresql.org X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200211/11 X-Sequence-Number: 3259 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: --- libpgtcl.sgml.orig 2002-01-20 17:19:56.000000000 -0500 +++ libpgtcl.sgml 2002-11-04 21:36:22.000000000 -0500 @@ -704,7 +704,7 @@ if the command was an INSERT, the OID of the -inserted tuple; otherwise an empty string. +inserted tuple; otherwise 0.