Re: binary operators on integers - Mailing list pgsql-general

From Peter Eisentraut
Subject Re: binary operators on integers
Date
Msg-id Pine.LNX.4.21.0009182216050.380-100000@peter
Whole thread Raw
In response to binary operators on integers  (Marko Kreen <marko@l-t.ee>)
Responses Re: binary operators on integers
List pgsql-general
Marko Kreen writes:

> I want to do simple and/or/xor/test operations on integers
> but PostgreSQL seems not to support this.  I found in conrib
> area the 'bit' package, which supports 'SQL-compliant bitstrings'
> but this is too weird for me and anyway it crashes too.

These were the remainders of a slightly too late implementation attempt
for 7.0. In 7.1 they should be fully functional.

> My situation: I want to implement a 'capabilities' field for
> application server, so different bits are for different
> capabilities.

Personally, I'd say using bit fields for that is pushing it a little too
hard. You could use shortint fields, or char(1)'s if you are not that
concerned about space.


--
Peter Eisentraut      peter_e@gmx.net       http://yi.org/peter-e/


pgsql-general by date:

Previous
From: "Roderick A. Anderson"
Date:
Subject: ODBC/IIS/PsotgreSQL
Next
From: Alex Guryanow
Date:
Subject: SPI_modifytuple for varchar