=?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.
regards, tom lane