Skip site navigation (1) Skip section navigation (2)

Re: I want to send comments to the backend!

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Gerhard Häring <lists(at)ghaering(dot)de>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>,pgsql-interfaces(at)postgresql(dot)org
Subject: Re: I want to send comments to the backend!
Date: 2003-03-20 16:10:36
Message-ID: 23845.1048176636@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-interfaces
=?ISO-8859-1?Q?Gerhard_H=E4ring?= <lists(at)ghaering(dot)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

In response to

Responses

pgsql-interfaces by date

Next:From: Bruce MomjianDate: 2003-03-20 16:12:19
Subject: Re: I want to send comments to the backend!
Previous:From: Peter EisentrautDate: 2003-03-20 16:03:57
Subject: Re: [INTERFACES] Roadmap for FE/BE protocol redesign

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group