Re: how to use $result->ruseltStatus - Mailing list pgsql-interfaces

From Tom Lane
Subject Re: how to use $result->ruseltStatus
Date
Msg-id 26908.989290619@sss.pgh.pa.us
Whole thread Raw
In response to how to use $result->ruseltStatus  (Randall Perry <rgp@systame.com>)
List pgsql-interfaces
Randall Perry <rgp@systame.com> writes:
> I want to make sure queries returned aren't empty.

Check the number of rows returned (after checking for OK
resultStatus).

> But it returns '2' (not sure which constant it is, but it's not
> PGRES_EMPTY_QUERY) on empty queries.

PGRES_EMPTY_QUERY means you sent an empty string as the query, eg$conn->exec("");
This is pretty useless, and is distinguished only for historical
reasons...
        regards, tom lane


pgsql-interfaces by date:

Previous
From: Randall Perry
Date:
Subject: how to use $result->ruseltStatus
Next
From: Juhan-Peep Ernits
Date:
Subject: Re: [JDBC] Re: Trouble with JDBC2 ResultSet.getDate()