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

From Tom Lane
Subject Re: I want to send comments to the backend!
Date
Msg-id 23845.1048176636@sss.pgh.pa.us
Whole thread Raw
In response to Re: I want to send comments to the backend!  (Gerhard Häring <lists@ghaering.de>)
Responses Re: I want to send comments to the backend!
Re: I want to send comments to the backend!
List pgsql-interfaces
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.
        regards, tom lane


pgsql-interfaces by date:

Previous
From: Gerhard Häring
Date:
Subject: Re: I want to send comments to the backend!
Next
From: Bruce Momjian
Date:
Subject: Re: I want to send comments to the backend!