Re: Tagging rows into collections?
От | Tom Lane |
---|---|
Тема | Re: Tagging rows into collections? |
Дата | |
Msg-id | 7413.1024521571@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Tagging rows into collections? (Steve Wampler <swampler@noao.edu>) |
Ответы |
Re: Tagging rows into collections?
|
Список | pgsql-sql |
Steve Wampler <swampler@noao.edu> writes: > An event has: timestamp,event_name,list_of_attributes > The list_of_attributes are simple (string) name,value pairs. > However, although selection performance isn't a priority, the > ability to reconstruct the events from the database is needed > and the above simple table doesn't provide enough information > to do so. (The resolution on the timestamp field isn't > enough to distinquish separate events that have the same name.) What PG version are you using? In 7.2 the default timestamp resolution is microseconds, rather than seconds. That might be enough to fix your problem. If not, your two-table approach sounds reasonable. You could stick with one table and use arrays for the name/value columns, but that will make searches harder. regards, tom lane
В списке pgsql-sql по дате отправления: