From: Tom Lane <tgl@sss.pgh.pa.us>
To: Steve Wampler <swampler@noao.edu>
Cc: postgres-sql <pgsql-sql@postgresql.org>
Subject: Re: Tagging rows into collections?
Date: Wed, 19 Jun 2002 17:19:31 -0400
Message-ID: <7413.1024521571@sss.pgh.pa.us> (raw)
In-Reply-To: <3D10AAFB.D51B1B66@noao.edu>
References: <3D10AAFB.D51B1B66@noao.edu>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: tgl@sss.pgh.pa.us, swampler@noao.edu
Subject: Re: Tagging rows into collections?
In-Reply-To: <7413.1024521571@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox