Skip site navigation (1) Skip section navigation (2)

Re: Postgres Wishlist

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: (view raw, whole thread or download thread mbox)
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;
(1 row)

postgres=# select 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

In response to


pgsql-novice by date

Next:From: Donald KerrDate: 2010-11-13 08:46:03
Subject: Re: Postgres Wishlist
Previous:From: Donald KerrDate: 2010-11-13 08:32:51
Subject: Re: Postgres Wishlist

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group