Re: Enforce primary key on every table during dev?

From: Rakesh Kumar <rakeshkumar464(at)aol(dot)com>
To: Daevor The Devoted <dollien(at)gmail(dot)com>
Cc: haramrae(at)gmail(dot)com, melvin6925(at)gmail(dot)com, theophilusx(at)gmail(dot)com, finzelj(at)gmail(dot)com, pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Enforce primary key on every table during dev?
Date: 2018-03-01 20:37:46
Message-ID: 504B42F8-BB02-436C-858E-88609FB09B75@aol.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> On Mar 1, 2018, at 12:47 , Daevor The Devoted <dollien(at)gmail(dot)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.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Daevor The Devoted 2018-03-01 20:44:09 Re: Enforce primary key on every table during dev?
Previous Message David G. Johnston 2018-03-01 20:36:12 Re: Enforce primary key on every table during dev?