Re: PQescapeLiteral in Libpq

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: PQescapeLiteral in Libpq
Дата
Msg-id 16244.1389295957@sss.pgh.pa.us
обсуждение исходный текст
Ответ на PQescapeLiteral in Libpq  ("lmanorders" <lmanorders@gmail.com>)
Список pgsql-novice
"lmanorders" <lmanorders@gmail.com> writes:
> I'm using the libpq.dll libraries to connect to postgress. When I issue a call to PQescapeLiteral with a file path as
theargument, the result string seems to always start with a bogus " E". 

That's not bogus, it's the intended behavior.  Per the source code:

     * If we are escaping a literal that contains backslashes, we use the
     * escape string syntax so that the result is correct under either value
     * of standard_conforming_strings.  We also emit a leading space in this
     * case, to guard against the possibility that the result might be
     * interpolated immediately following an identifier.

            regards, tom lane


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

Предыдущее
От: "lmanorders"
Дата:
Сообщение: PQescapeLiteral in Libpq
Следующее
От: David Johnston
Дата:
Сообщение: Re: PQescapeLiteral in Libpq