pg.ddx.io pgsql-interfaces@postgresql.org mailing list archive
help / color / mirror / Atom feedeekk tuples ok when there not!
4+ messages / 4 participants
[nested] [flat]
* eekk tuples ok when there not!
@ 1999-08-20 15:20 StOo <stuart@comodo.net>
1999-08-20 15:44 ` Re: [INTERFACES] eekk tuples ok when there not! The Hermit Hacker <scrappy@hub.org>
1999-08-20 16:33 ` Re: [INTERFACES] eekk tuples ok when there not! Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 2 replies; 4+ messages in thread
From: StOo @ 1999-08-20 15:20 UTC (permalink / raw)
To: pgsql-interfaces
postgres 6-5-1 on linux
after calling PgConnection::Exec(const char *query);
it returns PGRES_TUPLES_OK even when there is nothing in the table!
has anyone else noticed this?? or am i mad again =)
+-=-=-=-=-=-=-=-StOo-=-=-=-=-=-=-=-+
Stuart Hodgkinson - Software Engineer
Comodo Technology Development
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: [INTERFACES] eekk tuples ok when there not!
1999-08-20 15:20 eekk tuples ok when there not! StOo <stuart@comodo.net>
@ 1999-08-20 15:44 ` The Hermit Hacker <scrappy@hub.org>
1 sibling, 0 replies; 4+ messages in thread
From: The Hermit Hacker @ 1999-08-20 15:44 UTC (permalink / raw)
To: StOo <stuart@comodo.net>; +Cc: pgsql-interfaces
On Fri, 20 Aug 1999, StOo wrote:
>
> postgres 6-5-1 on linux
>
> after calling PgConnection::Exec(const char *query);
> it returns PGRES_TUPLES_OK even when there is nothing in the table!
> has anyone else noticed this?? or am i mad again =)
PGRES_TUPLES_OK, as I've always interpreted it, means that there were no
errors in the query itself...checking for res->ntuples is how to check for
the existence of any data...
Systems Administrator @ hub.org
primary: scrappy@hub.org secondary: scrappy@{freebsd|postgresql}.org
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: [INTERFACES] eekk tuples ok when there not!
1999-08-20 15:20 eekk tuples ok when there not! StOo <stuart@comodo.net>
@ 1999-08-20 16:33 ` Tom Lane <tgl@sss.pgh.pa.us>
1 sibling, 0 replies; 4+ messages in thread
From: Tom Lane @ 1999-08-20 16:33 UTC (permalink / raw)
To: StOo <stuart@comodo.net>; +Cc: pgsql-interfaces
StOo <stuart@comodo.net> writes:
> after calling PgConnection::Exec(const char *query);
> it returns PGRES_TUPLES_OK even when there is nothing in the table!
Yes. Always has, always will. PGRES_TUPLES_OK means you did a
SELECT and had no error --- it is not an error for the SELECT
to find no matching tuples. You have to look at PQntuples
to find out how many tuples you got back.
regards, tom lane
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: [INTERFACES] eekk tuples ok when there not!
@ 1999-08-20 15:59 Ken J. Wright <ken@ori-ind.com>
0 siblings, 0 replies; 4+ messages in thread
From: Ken J. Wright @ 1999-08-20 15:59 UTC (permalink / raw)
To: StOo <stuart@comodo.net>; pgsql-interfaces
At 15:20 08/20/1999 +0000, StOo wrote:
>
>postgres 6-5-1 on linux
>
>after calling PgConnection::Exec(const char *query);
>it returns PGRES_TUPLES_OK even when there is nothing in the table!
>has anyone else noticed this?? or am i mad again =)
Yes, and yes ;-). An empty result set does not constitute an error. It's
your job to check ntuples. Although, coming from lot's of years with
Paradox, I do sometimes miss the 100+ possible return codes.
Ken
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~1999-08-20 16:33 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1999-08-20 15:20 eekk tuples ok when there not! StOo <stuart@comodo.net>
1999-08-20 15:44 ` The Hermit Hacker <scrappy@hub.org>
1999-08-20 16:33 ` Tom Lane <tgl@sss.pgh.pa.us>
1999-08-20 15:59 Re: [INTERFACES] eekk tuples ok when there not! Ken J. Wright <ken@ori-ind.com>
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