Re: Enforce primary key on every table during dev? - Mailing list pgsql-general

From Rakesh Kumar
Subject Re: Enforce primary key on every table during dev?
Date
Msg-id 504B42F8-BB02-436C-858E-88609FB09B75@aol.com
Whole thread Raw
In response to Re: Enforce primary key on every table during dev?  (Daevor The Devoted <dollien@gmail.com>)
List pgsql-general

> On Mar 1, 2018, at 12:47 , Daevor The Devoted <dollien@gmail.com> wrote:
>
>
> I was always of the opinion that a mandatory surrogate key (as you describe) is good practice.
> Sure there may be a unique key according to business logic (which may be consist of those

> "ungainly" multiple columns), but guess what, business logic changes, and then you're screwed!


> So using a primary key whose sole purpose is to be a primary key makes perfect sense to me.

I did not get your point.  Can you explain why a change of business logic makes it difficult to change existing
rows with surrogate key.

thanks.

pgsql-general by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: Enforce primary key on every table during dev?
Next
From: Daevor The Devoted
Date:
Subject: Re: Enforce primary key on every table during dev?