pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Gerhard Häring <lists@ghaering.de>
Cc: Bruce Momjian <pgman@candle.pha.pa.us>
Cc: pgsql-interfaces@postgresql.org
Subject: Re: I want to send comments to the backend!
Date: Thu, 20 Mar 2003 11:10:36 -0500
Message-ID: <23845.1048176636@sss.pgh.pa.us> (raw)
In-Reply-To: <3E79E5B0.4020703@ghaering.de>
References: <200303201522.h2KFMpp24991@candle.pha.pa.us>
	<23655.1048175249@sss.pgh.pa.us>
	<3E79E5B0.4020703@ghaering.de>

=?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.

			regards, tom lane



view thread (25+ messages)  latest in thread

Message-ID: <23845.1048176636@sss.pgh.pa.us>
Permalink:  ../23845.1048176636@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/23845.1048176636@sss.pgh.pa.us

 · 

reply

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: tgl@sss.pgh.pa.us, lists@ghaering.de, pgman@candle.pha.pa.us
  Subject: Re: I want to send comments to the backend!
  In-Reply-To: <23845.1048176636@sss.pgh.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