Moritz Sinn <moritz(at)freesources(dot)org> writes:
> but i would like do be able doing the same with integers:
> SELECT 255::hex;
> ... and then getting 'ff'.
> do you know how i can realize that?
Sure, make a function hex(int) returning hex. The function name
must match the datatype name.
regards, tom lane