Re: Tagging rows into collections?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Steve Wampler <swampler(at)noao(dot)edu>
Cc: postgres-sql <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Tagging rows into collections?
Date: 2002-06-19 21:19:31
Message-ID: 7413.1024521571@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Steve Wampler <swampler(at)noao(dot)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

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2002-06-19 21:23:16 Re: syntax for access an alias in the where clause ?
Previous Message Michael Agbaglo 2002-06-19 21:13:31 Re: syntax for access an alias in the where clause ?