RE: Records exactly the same.

From: Jeff Eckermann <jeckermann(at)verio(dot)net>
To: "'Fons Rave'" <fonzzz(at)xs4all(dot)nl>, pgsql-sql(at)postgresql(dot)org
Subject: RE: Records exactly the same.
Date: 2001-07-23 15:14:38
Message-ID: 08CD1781F85AD4118E0800A0C9B8580B094B56@NEZU
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)xs4all(dot)nl]
> Sent: Saturday, July 21, 2001 7:15 AM
> To: pgsql-sql(at)postgresql(dot)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(at)xs4all(dot)nl
>
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly

Browse pgsql-sql by date

  From Date Subject
Next Message Josh Berkus 2001-07-23 15:26:50 Re: Re: Records exactly the same.
Previous Message Bhuvan A 2001-07-23 14:33:42 how can we get total records in pg server?