Re: I want to send comments to the backend!

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Gerhard Häring <lists(at)ghaering(dot)de>, pgsql-interfaces(at)postgresql(dot)org
Subject: Re: I want to send comments to the backend!
Date: 2003-03-20 17:22:17
Message-ID: 200303201722.h2KHMH614777@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

Tom Lane wrote:
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)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.

Yes, I see that now. res is NULL and PQresultStatus() is returning
PGRES_NONFATAL_ERROR. What is strange is that "" and "\n" both return
an OK result, so I am trying to figure out why comments are different.

> Perhaps PGRES_EMPTY_QUERY would be more appropriate? Not sure where in
> the chain would be best to change the behavior, though.

Yes.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Responses

Browse pgsql-interfaces by date

  From Date Subject
Next Message Tom Lane 2003-03-20 17:30:54 Re: I want to send comments to the backend!
Previous Message Tom Lane 2003-03-20 16:31:35 Re: I want to send comments to the backend!