Skip site navigation (1) Skip section navigation (2)

Bit Varying vs New Column

From: Barry Laffoon <gotobarry(at)gmail(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Bit Varying vs New Column
Date: 2011-07-04 19:26:48
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
Hi There,

I have a property on a web form that is multi-select so the property can
have multiple values. Normally I'd create separate column or a separate row
for each value. I am thinking of using the BIT VARYING() data type though
and storing the selected values as a bit mask. So I have several related

1. Any general comments on how this performs?
2. Does someone have an example of a query where clause with the values in
the BIT VARYING column being compared to a bit mask?
3. Does someone have a JDBC example. I've tried String, BYTE[], Blob, byte[]
as the Java type and none seem to work.



pgsql-novice by date

Next:From: Jean-Yves F. BarbierDate: 2011-07-04 19:41:25
Subject: Re: Bit Varying vs New Column
Previous:From: Greg Sabino MullaneDate: 2011-07-04 18:05:35
Subject: Re: Postgresql Wiki page

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group