Re: writing own cast
От | Moritz Sinn |
---|---|
Тема | Re: writing own cast |
Дата | |
Msg-id | m3fzxf56vt.fsf@moritz.sinnhq.de обсуждение исходный текст |
Ответ на | Re: writing own cast (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: writing own cast
|
Список | pgsql-general |
Tom Lane <tgl@sss.pgh.pa.us> writes: > Sure, make a function hex(int) returning hex. The function name > must match the datatype name. thanks, now it works! 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. well, that doesn't matter much, but it interests me if this problem could be solved too. i think the reason is that the input function of my hexadecimal datatype expects an string, and so the int is turned into an string and then passed to this input function. regards, moritz -- Try to remove the color-problem by restarting your computer several times. -- Microsoft Internet Explorer README.TXT
В списке pgsql-general по дате отправления: