X-Original-To: pgsql-interfaces@postgresql.org Received: from candle.pha.pa.us (momjian.navpoint.com [207.106.42.251]) by postgresql.org (Postfix) with ESMTP id 4B11B476350 for ; Thu, 20 Mar 2003 11:12:24 -0500 (EST) Received: (from pgman@localhost) by candle.pha.pa.us (8.11.6/8.10.1) id h2KGCJc06432; Thu, 20 Mar 2003 11:12:19 -0500 (EST) From: Bruce Momjian Message-Id: <200303201612.h2KGCJc06432@candle.pha.pa.us> Subject: Re: I want to send comments to the backend! In-Reply-To: <23845.1048176636@sss.pgh.pa.us> To: Tom Lane Date: Thu, 20 Mar 2003 11:12:19 -0500 (EST) Cc: =?ISO-8859-1?Q?Gerhard_H=E4ring?= , pgsql-interfaces@postgresql.org X-Mailer: ELM [version 2.4ME+ PL99 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Archive-Number: 200303/97 X-Sequence-Number: 3846 Tom Lane wrote: > =?ISO-8859-1?Q?Gerhard_H=E4ring?= 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