Re: Postgres Wishlist
| От | Michael Glaesemann |
|---|---|
| Тема | Re: Postgres Wishlist |
| Дата | |
| Msg-id | C6A31827-F349-459E-A5F9-5CD682C002C8@seespotcode.net обсуждение исходный текст |
| Ответ на | Re: Postgres Wishlist ("Donald Kerr" <donald.kerr@dkerr.co.uk>) |
| Ответы |
Re: Postgres Wishlist
|
| Список | 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.
build5664), 64-bit
(1 row)
Michael Glaesemann
grzm seespotcode net
В списке pgsql-novice по дате отправления: