| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Moritz Sinn <moritz(at)freesources(dot)org> |
| Cc: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: writing own cast |
| Date: | 2002-08-16 13:56:58 |
| Message-ID: | 7232.1029506218@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
Moritz Sinn <moritz(at)freesources(dot)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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Oliver Elphick | 2002-08-16 14:00:23 | Re: Triggers |
| Previous Message | Elielson Fontanezi | 2002-08-16 13:51:12 | DAO for PostGRE |