Re: IS it a good practice to use SERIAL as Primary Key? - Mailing list pgsql-general

From Harald Armin Massa
Subject Re: IS it a good practice to use SERIAL as Primary Key?
Date
Msg-id 7be3f35d0611271123h2d298eb7m893e419d691f5f57@mail.gmail.com
Whole thread Raw
In response to Re: IS it a good practice to use SERIAL as Primary Key?  (John McCawley <nospam@hardgeus.com>)
Responses Re: IS it a good practice to use SERIAL as Primary Key?  (Ron Johnson <ron.l.johnson@cox.net>)
List pgsql-general
John,

I'll weigh in my my .02 on this subject.  After much pain and agony in
the real world, I have taken the stance that every table in my database
must have an arbitrary, numeric primary key (generally autogenerated).

I feel the same.

In the "real world" there is no such thing as a primary key. At least not over time. Not enough people understand the concept of a primary key to make those things existent in the real world.

So we take an artificially primary key - and most reliable way is to create it yourself.

Harald



--
GHUM Harald Massa
persuadere et programmare
Harald Armin Massa
Reinsburgstraße 202b
70197 Stuttgart
0173/9409607
-
Python: the only language with more web frameworks than keywords.

pgsql-general by date:

Previous
From: "Brandon Aiken"
Date:
Subject: Re: IS it a good practice to use SERIAL as Primary Key?
Next
From: Tony Caduto
Date:
Subject: fatal error on 8.1 server