Re: Escaped backslash in SQL constant

Поиск
Список
Период
Сортировка
От CN
Тема Re: Escaped backslash in SQL constant
Дата
Msg-id 1135403538.24440.250483260@webmail.messagingengine.com
обсуждение исходный текст
Ответ на Re: Escaped backslash in SQL constant  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Thank you again for the clarification!

> I'm not sure how to explain it any more clearly: the backslash in this
> example is not a backslash.  It's a byte within a multibyte character,
> which *entirely coincidentally* happens to have the same numeric value
> as an ASCII backslash.  But it isn't a backslash.  And it won't be
> processed as a backslash by any Big5-aware code.

If I understand this explanation correctly, then you have given me the
answer I needed!
Please correct me if my understanding that follows is wrong again:

PostgreSQL is Big5-aware code. It does not blindly unescape every
backlash it encounters in SQL literals. Instead, it sees backslash as
part of some Big5 characters as they are supposed to be when client
encoding is set to Big5 (SET CLIENT_ENCODING TO BIG5). In other words,
PostgreSQL sees the backslash in "C:\134" differently from that being
part of multi-byte characters depending on which client encoding is
used.

Regards,

CN

--
http://www.fastmail.fm - And now for something completely different�


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Escaped backslash in SQL constant
Следующее
От: Bruno Wolff III
Дата:
Сообщение: Re: query for a time interval