Re: Query problem - Mailing list pgsql-sql

From Richard Huxton
Subject Re: Query problem
Date
Msg-id 200308191521.05085.dev@archonet.com
Whole thread Raw
In response to Query problem  (Rado Petrik <r.p@szm.sk>)
List pgsql-sql
On Tuesday 19 August 2003 14:02, Rado Petrik wrote:
> id      bit(dec)    bit(bin)
> -----------------------------
>  1       1             1
>  2       3            11
>  3       12         1100
>
>
> and I need query  - >
>
> SELECT "output" FROM user WHERE id = 1 OR id = 2  or id = 3
> output = (1111)

PG supports bit-strings which I guess are designed for exactly this situation. 
See the "data types" section of the manual for details.

--  Richard Huxton Archonet Ltd


pgsql-sql by date:

Previous
From: Marco Vezzoli
Date:
Subject: Re: postgres 7.1.3: why does the query plan ignore indexes?
Next
From: Bruno Wolff III
Date:
Subject: Re: Query problem