Re: Re: charin(), text_char() should return something else for empty input
В списке pgsql-hackers по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: Re: charin(), text_char() should return something else for empty input |
| Дата | |
| Msg-id | 20099.991176913@sss.pgh.pa.us обсуждение |
| Ответ на | Re: Re: charin(), text_char() should return something else for empty input (Peter Eisentraut <peter_e@gmx.net>) |
| Список | pgsql-hackers |
Peter Eisentraut <peter_e@gmx.net> writes:
> In general, I don't see a point in accepting a zero byte in character
> strings. If you want to store binary data there are binary data types (or
> effort could be invested in them).
If we were starting in a green field then I'd think it worthwhile to
maintain null-byte-cleanness for the textual datatypes. At this point,
though, the amount of pain involved seems to vastly outweigh the value.
The major problem is that I/O conventions not based on null-terminated
strings would break all existing user-defined datatypes. (Changing our
own code is one thing, breaking users' code is something else.) There
are minor-by-comparison problems like not being able to use strcoll()
for locale-sensitive comparisons anymore...
I agree with Peter that spending some extra effort on bytea and/or
similar types is probably a more profitable answer.
regards, tom lane
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера