Re: Query problem

From: Richard Huxton <dev(at)archonet(dot)com>
To: Rado Petrik <r(dot)p(at)szm(dot)sk>, PostgreSQL-mailinglist <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Query problem
Date: 2003-08-19 14:21:05
Message-ID: 200308191521.05085.dev@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Bruno Wolff III 2003-08-19 15:50:07 Re: Query problem
Previous Message Marco Vezzoli 2003-08-19 13:41:01 Re: postgres 7.1.3: why does the query plan ignore indexes?