From: Richard Huxton <dev@archonet.com>
To: tyrrill_ed@emc.com
Cc: pgsql-sql@postgresql.org
Subject: Re: Bit string help, please
Date: Thu, 06 Mar 2008 18:35:51 +0000
Message-ID: <47D03987.9000307@archonet.com> (raw)
In-Reply-To: <4FB0C599D8D0B14FA37B46EAD92F2153036EF2A2@CORPUSMX60C.corp.emc.com>
References: <4FB0C599D8D0B14FA37B46EAD92F2153036EEC5E@CORPUSMX60C.corp.emc.com>
<47CFA7B7.9080902@archonet.com>
<4FB0C599D8D0B14FA37B46EAD92F2153036EF2A2@CORPUSMX60C.corp.emc.com>
tyrrill_ed@emc.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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: dev@archonet.com, tyrrill_ed@emc.com
Subject: Re: Bit string help, please
In-Reply-To: <47D03987.9000307@archonet.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox