| From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | Gerhard Häring <lists(at)ghaering(dot)de>, pgsql-interfaces(at)postgresql(dot)org |
| Subject: | Re: I want to send comments to the backend! |
| Date: | 2003-03-20 16:12:19 |
| Message-ID: | 200303201612.h2KGCJc06432@candle.pha.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-interfaces |
Tom Lane wrote:
> =?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.
It returns PGRES_NONFATAL_ERROR. Why should this be an error?
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Bruce Momjian | 2003-03-20 16:13:16 | Re: [INTERFACES] Roadmap for FE/BE protocol redesign |
| Previous Message | Tom Lane | 2003-03-20 16:10:36 | Re: I want to send comments to the backend! |