| От | Ragnar |
|---|---|
| Тема | Re: Table design - unknown number of column |
| Дата | |
| Msg-id | 1163067040.8950.233.camel@localhost.localdomain обсуждение исходный текст |
| Ответ на | Re: Table design - unknown number of column (Alban Hertroys <alban@magproductions.nl>) |
| Список | pgsql-general |
On fim, 2006-11-09 at 10:56 +0100, Alban Hertroys wrote: > Richard Ollier wrote: > > For a project I have a table containing products and flags. > > The columns of this table are of 2 kinds : > > - Not null data (id, column1, column2) > > - Flags (100 different flags set to 1 or 0) > > > > Over the time the number of flag will increase from 100 to 200 or more. > > Having 200 flags as 200 fields... Writing queries on that is going to be > painful. > > I would probably look at bitwise operations, although 200 bits is quite > a bit larger than a bigint. Maybe an array of ints would work... maybe the BIT VARYING datatype could be useful. http://www.postgresql.org/docs/8.1/interactive/datatype-bit.html gnari
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера