Re: I want to send comments to the backend!

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: I want to send comments to the backend!
Дата
Msg-id 200303201612.h2KGCJc06432@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: I want to send comments to the backend!  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: I want to send comments to the backend!  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-interfaces
Tom Lane wrote:
> Gerhard Häring <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,
Pennsylvania19073
 


В списке pgsql-interfaces по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: I want to send comments to the backend!
Следующее
От: Tom Lane
Дата:
Сообщение: Re: I want to send comments to the backend!