Re: Mention invalid null byte sequence

Поиск
Список
Период
Сортировка
От Adrien CLERC
Тема Re: Mention invalid null byte sequence
Дата
Msg-id db918f32-2182-b083-c7bb-8c20cb521168@antipoul.fr
обсуждение исходный текст
Ответ на Re: Mention invalid null byte sequence  (Laurenz Albe <laurenz.albe@cybertec.at>)
Список pgsql-docs
Le 07/12/2020 à 10:02, Laurenz Albe a écrit :
On Sat, 2020-12-05 at 21:58 +0000, PG Doc comments form wrote:
The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/13/datatype-character.html
Description:

I discovered accidentally that PostgreSQL doesn't accept null byte in text
type. It seems that Oracle does (see
https://www.postgresql.org/message-id/de752e01-f36c-821e-9181-cfba78c0fbc8%40propaas.com)
and SQLite does it too.

So it should written in the character type that null byte are not accepted,
it would make like easier to migrate to PostgreSQL :)
+1; how about the attached patch?

That would be a good start indeed.

I don't know the policy for documentation redundancy in PostgreSQL, but it should be good to mention that also in https://www.postgresql.org/docs/current/sql-syntax-lexical.html#SQL-SYNTAX-STRINGS-ESCAPE since the basic "SELECT E'la\x00la';" will fail while "SELECT E'la\x01la';" will not.

And, as a lazy person, I also would like to see it in the general datatype page, since it's a common behavior.

Anyway, merging the first patch will enable the search for "NUL character" to return a result, and that will be definitively a nice improvement!

Have a nice day!

Adrien

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

Предыдущее
От: Laurenz Albe
Дата:
Сообщение: Re: Mention invalid null byte sequence
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Mention invalid null byte sequence