Re: possible design bug with PQescapeString()

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: possible design bug with PQescapeString()
Дата
Msg-id 11565.1140369228@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: possible design bug with PQescapeString()  (Florian Weimer <fw@deneb.enyo.de>)
Ответы Re: possible design bug with PQescapeString()  (Martijn van Oosterhout <kleptog@svana.org>)
Список pgsql-hackers
Florian Weimer <fw@deneb.enyo.de> writes:
> Uh-oh, this is my fault.  PQescapeString should escape all characters
> greater than 126.

No, that doesn't work, because the de-escaping on the backend side
happens *after* conversion to the backend encoding.  If you insert escapes
into the middle of multibyte characters then you break the conversion.

Tatsuo's description of the problem is accurate (though I'm not sure
I agree with his solution ;-))
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Prepared Xacts and Vacuum question
Следующее
От: "Jim C. Nasby"
Дата:
Сообщение: Re: Config file for psql