| От | Tom Lane |
|---|---|
| Тема | Re: writing own cast |
| Дата | |
| Msg-id | 7232.1029506218@sss.pgh.pa.us обсуждение |
| Ответ на | Re: writing own cast (Moritz Sinn <moritz@freesources.org>) |
| Список | pgsql-general |
Moritz Sinn <moritz@freesources.org> writes:
> but i've to type 255::int::hex, because when i type 255::hex it first
> casts the int to an string and then to hex, so it returns 255 instead of
> ff.
I think this means that you need to rethink your I/O definitions for the
datatype. 255::hex is not really different from '255'::hex, and should
not be because the type of the literal constant is as yet unassigned.
The operation invoked is your type's input routine, and nothing else.
An operation like integercolumn::hex is a completely different thing.
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера