pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: StOo <stuart@comodo.net>
Cc: interfaces <pgsql-interfaces@postgreSQL.org>
Subject: Re: [INTERFACES] eekk tuples ok when there not!
Date: Fri, 20 Aug 1999 12:33:52 -0400
Message-ID: <14994.935166832@sss.pgh.pa.us> (raw)
In-Reply-To: <37BD725A.23721DF1@comodo.net>

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



view thread (4+ messages)

Message-ID: <14994.935166832@sss.pgh.pa.us>
Permalink:  ../14994.935166832@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/14994.935166832@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: tgl@sss.pgh.pa.us, stuart@comodo.net
  Subject: Re: [INTERFACES] eekk tuples ok when there not!
  In-Reply-To: <14994.935166832@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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