From: Bruce Momjian <pgman@candle.pha.pa.us>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Gerhard Häring <lists@ghaering.de>
Cc: pgsql-interfaces@postgresql.org
Subject: Re: I want to send comments to the backend!
Date: Thu, 20 Mar 2003 11:12:19 -0500 (EST)
Message-ID: <200303201612.h2KGCJc06432@candle.pha.pa.us> (raw)
In-Reply-To: <23845.1048176636@sss.pgh.pa.us>
Tom Lane wrote:
> =?ISO-8859-1?Q?Gerhard_H=E4ring?= <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, Pennsylvania 19073
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: pgman@candle.pha.pa.us, tgl@sss.pgh.pa.us, lists@ghaering.de
Subject: Re: I want to send comments to the backend!
In-Reply-To: <200303201612.h2KGCJc06432@candle.pha.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox