Re: writing own cast

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 05:09:22
Message-ID: 4637.1029474562@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message mixo 2002-08-16 08:33:03 last entry
Previous Message Tom Lane 2002-08-16 04:46:19 Re: again: how to synchronize database operations?