From: | Michael Glaesemann <grzm(at)seespotcode(dot)net> |
---|---|
To: | Donald Kerr <donald(dot)kerr(at)dkerr(dot)co(dot)uk> |
Cc: | "'Tom Lane'" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "'Steve Crawford'" <scrawford(at)pinpointresearch(dot)com>, <pgsql-novice(at)postgresql(dot)org> |
Subject: | Re: Postgres Wishlist |
Date: | 2010-11-13 08:44:53 |
Message-ID: | C6A31827-F349-459E-A5F9-5CD682C002C8@seespotcode.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
On Nov 13, 2010, at 3:32 , Donald Kerr wrote:
> Thank you, Tom.
>
> I have tried what you suggest but it does not seem to work:
> 'x'||substring(col,3,2)::text::bit(8)::int returns - "9" is not a valid
> binary digit.
Try with parens:
postgres=# select ('x' || 99::text)::bit(8)::int;
int4
------
153
(1 row)
postgres=# select version();
version
------------------------------------------------------------------------------------------------------------------------------------------
PostgreSQL 9.0.1 on x86_64-apple-darwin10.4.0, compiled by GCC i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5664), 64-bit
(1 row)
Michael Glaesemann
grzm seespotcode net
From | Date | Subject | |
---|---|---|---|
Next Message | Donald Kerr | 2010-11-13 08:46:03 | Re: Postgres Wishlist |
Previous Message | Donald Kerr | 2010-11-13 08:32:51 | Re: Postgres Wishlist |