Обсуждение: Bit String Manipulation

Поиск
Список
Период
Сортировка

Bit String Manipulation

От
psql-mail@freeuk.com
Дата:
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!