Re: [HACKERS] Oid Questions - Mailing list pgsql-hackers

From Zeev Suraski
Subject Re: [HACKERS] Oid Questions
Date
Msg-id 3.0.3.32.19980123003309.00cffd50@bourbon.netvision.net.il
Whole thread Raw
In response to Re: [HACKERS] Oid Questions  (Bruce Momjian <maillist@candle.pha.pa.us>)
Responses Re: [HACKERS] Oid Questions  (Bruce Momjian <maillist@candle.pha.pa.us>)
List pgsql-hackers
I'll try to rephrase the question without taking 3 complex paragraphs to do
that :)

Is there a way to know a PostgresSQL result holds NO interesting
information (no rows, no oids, no nothing)?

The more I think of it, the more it seems like this isn't the case with
PostgresSQL.  Moreover, it seems like in most cases the result holds one
interesting tidbit of information or another.  When I wrote the MySQL
module, basically, I made any query that did not return rows (not including
select's that returned 0 rows) but succeeded return TRUE instead of a
result handler, since there wasn't much point at keeping that result.  With
MySQL the information about the last inserted id (mysql_insert_it(), I
think it's comparable to the last oid in pgsql) and the number of affected
rows can be obtained from the 'server' structure, and not the restul
structure as it is with Postgres.

I guess I'll change the Postgres module to always keep the result
structures and return result identifiers on a successful query.

Zeev
---
Zeev Suraski  <zeev@php.net>
Web programmer, System administrator, Netvision LTD
http://bourbon.netvision.net.il/   ICQ: 1450980
For a PGP public key, finger bourbon@netvision.net.il

pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] Oid Questions
Next
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] Oid Questions