Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id D0EFF476E90 for ; Thu, 7 Nov 2002 23:56:49 -0500 (EST) Received: from candle.pha.pa.us (momjian.navpoint.com [207.106.42.251]) by postgresql.org (Postfix) with ESMTP id BB2E8476E36 for ; Thu, 7 Nov 2002 23:56:45 -0500 (EST) Received: (from pgman@localhost) by candle.pha.pa.us (8.11.6/8.10.1) id gA84uME00830; Thu, 7 Nov 2002 23:56:22 -0500 (EST) From: Bruce Momjian Message-Id: <200211080456.gA84uME00830@candle.pha.pa.us> Subject: Re: pgtcl: Change in behavior of pg_result -oid, vs documentation In-Reply-To: To: ljb Date: Thu, 7 Nov 2002 23:56:22 -0500 (EST) Cc: pgsql-interfaces@postgresql.org X-Mailer: ELM [version 2.4ME+ PL99 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200211/18 X-Sequence-Number: 3266 Doc patch applied to 7.3 and current CVS. Thanks. --------------------------------------------------------------------------- ljb wrote: > 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. > > > > > ---------------------------(end of broadcast)--------------------------- > TIP 6: Have you searched our list archives? > > http://archives.postgresql.org > -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073