Bit String Manipulation

From: psql-mail(at)freeuk(dot)com
To: pgsql-general(at)postgresql(dot)org
Subject: Bit String Manipulation
Date: 2003-08-18 09:59:15
Message-ID: E19ognD-000Obh-00@buckaroo.freeuk.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi, I am having problems manipulating bit strings.

CREATE TABLE lookup(
fname TEXT PRIMARY KEY,
digest BIT VARYING
);

I am trying to construct another bit string based on the length of the
first:

SELECT b'1'::bit( bit_length( digest ) ) FROM lookup;

This doesn't work as i had hoped, where am I going wrong?

Thanks!

Browse pgsql-general by date

  From Date Subject
Next Message Jason Godden 2003-08-18 10:38:37 Re: C vs plpgsql and child processes
Previous Message Johann Uhrmann 2003-08-18 09:48:13 Performance with different index types