Re: Tagging rows into collections? - Mailing list pgsql-sql

From Tom Lane
Subject Re: Tagging rows into collections?
Date
Msg-id 7413.1024521571@sss.pgh.pa.us
Whole thread Raw
In response to Tagging rows into collections?  (Steve Wampler <swampler@noao.edu>)
Responses Re: Tagging rows into collections?  (Richard Huxton <dev@archonet.com>)
List 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 by date:

Previous
From: Michael Agbaglo
Date:
Subject: Re: syntax for access an alias in the where clause ?
Next
From: Tom Lane
Date:
Subject: Re: syntax for access an alias in the where clause ?