RE: Records exactly the same. - Mailing list pgsql-sql

From Jeff Eckermann
Subject RE: Records exactly the same.
Date
Msg-id 08CD1781F85AD4118E0800A0C9B8580B094B56@NEZU
Whole thread Raw
In response to Records exactly the same.  ("Fons Rave" <fonzzz@xs4all.nl>)
List pgsql-sql
The content of your record is not limited to user data.  Including a field
that provides a unique key is simple: look at the documentation for data
type SERIAL for an easy way to do this.
You can also include information about when the record was inserted, and by
whom, just by including fields in your table definition like:
when_inserted    timestamp default now(),
who_inserted    text default current_user,
which will be populated automatically every time a record is inserted.
Also, see documentation on triggers for more sophisticated ways of doing
this kind of thing.

> -----Original Message-----
> From:    Fons Rave [SMTP:fonzzz@xs4all.nl]
> Sent:    Saturday, July 21, 2001 7:15 AM
> To:    pgsql-sql@postgresql.org
> Subject:    Re: Records exactly the same.
> 
> > Well, there isn't an easy answer for you ... because you've designed
> > your database wrong.  Records should *never* be the same.  That is, ni
> > fact, one of the cardinal rules of Relational Database Design.
> 
> Well, I started with "I'm a beginner". But I'm sure there's no reason NOT
> to
> accept two records that are exactly the same. In the example I gave, it is
> clear
> that the information I want to store can contain two records that are
> exactly
> the same; doing the same thing, on the same day, for the same amount of
> time. In
> this case it is the technical structure that doesn't want it like that. So
> I
> have to change it to make it work.
> 
> Fons.
> fonzzz@xs4all.nl
> 
> 
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly


pgsql-sql by date:

Previous
From: Jan Wieck
Date:
Subject: Re: Re: PLpgSQL
Next
From: karl@tecc.co.uk (Karl Orbell)
Date:
Subject: position(text,text) function