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?  (Richard Huxton <dev@archonet.com>)
Список 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 по дате отправления:

Предыдущее
От: Michael Agbaglo
Дата:
Сообщение: Re: syntax for access an alias in the where clause ?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: syntax for access an alias in the where clause ?