Re: chr(3) and 3::text

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: chr(3) and 3::text
Дата
Msg-id CAKFQuwactR8-=cT8ENNYUQRvey9aQ6m832xozmbZF3ei9YU51Q@mail.gmail.com
обсуждение исходный текст
Ответ на Re: chr(3) and 3::text  (gmail Vladimir Koković <vladimir.kokovic@gmail.com>)
Список pgsql-novice
On Sat, Mar 28, 2020 at 8:39 AM gmail Vladimir Koković <vladimir.kokovic@gmail.com> wrote:
On 28.3.20. 16:25, David G. Johnston wrote:

integer::text == text, but which character 0x03 or 0x33 ?

x33

Text should contain characters.

Characters is from character set.

Character 0x03 is valid in ASCII and UTF-8 character sets.

So is x33

Which one is more useful to the typical programmer (which given you concept of works and wrong in the OP your problem space is probably not typical)?  Treating the integer value 3 as a code point reference or treating it as a character in a given character set.

I hope you agree that the character interpretation is more useful, though regardless of your agreement that is what happens.  Everything else is just an implementation detail.

Numbers > 9 are converted digit-by-digit into their character representations and then concatenated together.


David J.

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: chr(3) and 3::text
Следующее
От: Chris Coutinho
Дата:
Сообщение: Tracking mutations in table data