Re: [HACKERS] hex integer input

2007-03-02 Thread Jeremy Drake
On Fri, 2 Mar 2007, Tom Lane wrote: > Jeremy Drake <[EMAIL PROTECTED]> writes: > > On several occasions I have wanted to input integers in hexadecimal rather > > than in decimal in PostgreSQL. I notice that there is a to_hex function, > > but there is not (AFAIK) a way to provide an integer in he

Re: [HACKERS] hex integer input

2007-03-01 Thread Tom Lane
Jeremy Drake <[EMAIL PROTECTED]> writes: > On several occasions I have wanted to input integers in hexadecimal rather > than in decimal in PostgreSQL. I notice that there is a to_hex function, > but there is not (AFAIK) a way to provide an integer in hexadecimal. regression=# select x'abcd'::int;

[HACKERS] hex integer input

2007-03-01 Thread Jeremy Drake
On several occasions I have wanted to input integers in hexadecimal rather than in decimal in PostgreSQL. I notice that there is a to_hex function, but there is not (AFAIK) a way to provide an integer in hexadecimal. I have written a pure-sql implementation of some functions to input integers in