pg.ddx.io pgsql-interfaces@postgresql.org mailing list archive
help / color / mirror / Atom feedpgtcl: Change in behavior of pg_result -oid, vs documentation
2+ messages / 2 participants
[nested] [flat]
* pgtcl: Change in behavior of pg_result -oid, vs documentation
@ 2002-11-07 01:26 ljb <lbayuk@mindspring.com>
2002-11-08 04:56 ` Re: pgtcl: Change in behavior of pg_result -oid, vs documentation Bruce Momjian <pgman@candle.pha.pa.us>
0 siblings, 1 reply; 2+ messages in thread
From: ljb @ 2002-11-07 01:26 UTC (permalink / raw)
To: pgsql-interfaces
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:
inline patch 1: libpgtcl.sgml (+1/-1 lines) download inline-1.patch
--- 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 @@
<LISTITEM>
<PARA>
if the command was an INSERT, the OID of the
-inserted tuple; otherwise an empty string.
+inserted tuple; otherwise 0.
</PARA>
</LISTITEM>
</VARLISTENTRY>
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: pgtcl: Change in behavior of pg_result -oid, vs documentation
2002-11-07 01:26 pgtcl: Change in behavior of pg_result -oid, vs documentation ljb <lbayuk@mindspring.com>
@ 2002-11-08 04:56 ` Bruce Momjian <pgman@candle.pha.pa.us>
0 siblings, 0 replies; 2+ messages in thread
From: Bruce Momjian @ 2002-11-08 04:56 UTC (permalink / raw)
To: ljb <lbayuk@mindspring.com>; +Cc: pgsql-interfaces
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 @@
> <LISTITEM>
> <PARA>
> if the command was an INSERT, the OID of the
> -inserted tuple; otherwise an empty string.
> +inserted tuple; otherwise 0.
> </PARA>
> </LISTITEM>
> </VARLISTENTRY>
>
> ---------------------------(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
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2002-11-08 04:56 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-11-07 01:26 pgtcl: Change in behavior of pg_result -oid, vs documentation ljb <lbayuk@mindspring.com>
2002-11-08 04:56 ` Bruce Momjian <pgman@candle.pha.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox