Re: [SQL] How to solve the old bool attributes vs pivoting issue?

2012-06-27 Thread Samuel Gendler
On Wed, Jun 27, 2012 at 7:26 PM, David Johnston wrote: > On Jun 27, 2012, at 21:07, Andreas wrote: > > > You should look and see whether the hstore contrib module will meet your > needs. > > http://www.postgresql.org/docs/9.1/interactive/hstore.html > > hstore is certainly an option, as are the

Re: [SQL] How to solve the old bool attributes vs pivoting issue?

2012-06-27 Thread David Johnston
On Jun 27, 2012, at 21:07, Andreas wrote: > Hi > > I do keep a table of objects ... let's say companies. > > I need to collect flags that express yes / no / don't know. > > TRUE / FALSE / NULL would do. > > > Solution 1: > I have a boolean column for every flag within the companies-table.

[SQL] How to solve the old bool attributes vs pivoting issue?

2012-06-27 Thread Andreas
Hi I do keep a table of objects ... let's say companies. I need to collect flags that express yes / no / don't know. TRUE / FALSE / NULL would do. Solution 1: I have a boolean column for every flag within the companies-table. Whenever I need an additional flag I'll add another column. This