Bruce Momjian <pgman@candle.pha.pa.us> writes:
> It returns PGRES_NONFATAL_ERROR. Why should this be an error?
Actually, you don't get a "res" object at all, because nothing happened.
The only place in libpq that returns that code is PQresultStatus itself.
Perhaps PGRES_EMPTY_QUERY would be more appropriate? Not sure where in
the chain would be best to change the behavior, though.
regards, tom lane