Re: Bit string help, please

From: Richard Huxton <dev(at)archonet(dot)com>
To: tyrrill_ed(at)emc(dot)com
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Bit string help, please
Date: 2008-03-06 18:35:51
Message-ID: 47D03987.9000307@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

tyrrill_ed(at)emc(dot)com wrote:
> I tried this real quick at the psql command prompt, and unfortunately it
> doesn't work:
>
> mydb=# select ('1' || repeat('0',7))::bit varying;
> ERROR: cannot cast type text to bit varying
>
> I appreciate the try though. Any other ideas? I am using PostgreSQL
> 8.2.3.1. I don't know if that matters too much.

Ah, sorry - that was an 8.3-only cast.

I think your only real option will be to build your query as a string
and use EXECUTE to get the bit-varying you want in your function.

--
Richard Huxton
Archonet Ltd

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Tena Sakai 2008-03-06 18:50:43 Re: Bit string help, please
Previous Message tyrrill_ed 2008-03-06 18:24:44 Re: Bit string help, please