Re: I want to send comments to the backend! - Mailing list pgsql-interfaces

From Bruce Momjian
Subject Re: I want to send comments to the backend!
Date
Msg-id 200303201612.h2KGCJc06432@candle.pha.pa.us
Whole thread Raw
In response to Re: I want to send comments to the backend!  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: I want to send comments to the backend!  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-interfaces
Tom Lane wrote:
> Gerhard Häring <lists@ghaering.de> writes:
> >> I'm quite certain that libpq does not strip comments, so the complaint
> >> isn't strictly accurate...
> 
> > Then why does the attached program not work?
> 
> >     res = PQexec(conn, "-- foobar");
> >     if (!res || PQresultStatus(res) != PGRES_COMMAND_OK)
> 
> Because a comment isn't an SQL command.  I forget what the result status
> is in this case, but COMMAND_OK ain't it.

It returns PGRES_NONFATAL_ERROR.  Why should this be an error?

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


pgsql-interfaces by date:

Previous
From: Tom Lane
Date:
Subject: Re: I want to send comments to the backend!
Next
From: Tom Lane
Date:
Subject: Re: I want to send comments to the backend!