Re: [rfc] unicode escapes for extended strings

Поиск
Список
Период
Сортировка
От Sam Mason
Тема Re: [rfc] unicode escapes for extended strings
Дата
Msg-id 20090417174625.GF12225@frubble.xen.chris-lamb.co.uk
обсуждение исходный текст
Ответ на Re: [rfc] unicode escapes for extended strings  (Martijn van Oosterhout <kleptog@svana.org>)
Ответы Re: [rfc] unicode escapes for extended strings  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Fri, Apr 17, 2009 at 07:01:47PM +0200, Martijn van Oosterhout wrote:
> On Fri, Apr 17, 2009 at 07:07:31PM +0300, Marko Kreen wrote:
> > Btw, is there any good reason why we don't reject \000, \x00
> > in text strings?
> 
> Why forbid nulls in text strings?

As far as I know, PG assumes, like most C code, that strings don't
contain embedded NUL characters.  The manual[1] has this to says:
 The character with the code zero cannot be in a string constant.

I believe you're supposed to use values of type "bytea" when you're
expecting to deal with NUL characters.

--  Sam  http://samason.me.uk/[1]
http://www.postgresql.org/docs/current/static/sql-syntax-lexical.html#SQL-SYNTAX-STRINGS


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

Предыдущее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: [rfc] unicode escapes for extended strings
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: Replacing plpgsql's lexer