Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1erU2t-0003lQ-V0 for pgsql-general@arkaria.postgresql.org; Thu, 01 Mar 2018 19:39:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1erU2s-00048G-Py for pgsql-general@arkaria.postgresql.org; Thu, 01 Mar 2018 19:39:14 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1erU2s-000487-8S for pgsql-general@lists.postgresql.org; Thu, 01 Mar 2018 19:39:14 +0000 Received: from eastrmfepo201.cox.net ([68.230.241.216]) by makus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1erU2q-0001Um-07 for pgsql-general@lists.postgresql.org; Thu, 01 Mar 2018 19:39:13 +0000 Received: from eastrmimpo109.cox.net ([68.230.241.222]) by eastrmfepo201.cox.net (InterMail vM.8.01.05.28 201-2260-151-171-20160122) with ESMTP id <20180301193911.HAIE1466.eastrmfepo201.cox.net@eastrmimpo109.cox.net> for ; Thu, 1 Mar 2018 14:39:11 -0500 Received: from [192.168.1.10] ([70.171.109.83]) by eastrmimpo109.cox.net with cox id GjfA1x01H1o04Vy01jfBnF; Thu, 01 Mar 2018 14:39:11 -0500 X-Authority-Analysis: v=2.2 cv=bLhmGL2Z c=1 sm=1 tr=0 a=uCHdjGDeLqaieW9t8IbZ6A==:117 a=uCHdjGDeLqaieW9t8IbZ6A==:17 a=x7bEGLp0ZPQA:10 a=T11QR6bd6vIA:10 a=r77TgQKjGQsHNAKrUKIA:9 a=kviXuzpPAAAA:8 a=rSuHFyJnTY5y5hKIesYA:9 a=QEXdDO2ut3YA:10 a=pGLkceISAAAA:8 a=cIviokS13fYHR0OMoz8A:9 a=5-AM9HlCyjdr2fNM:21 a=_W_S_7VecoQA:10 a=qrIFiuKZe2vaD64auk6j:22 X-CM-Score: 0.00 Authentication-Results: cox.net; auth=pass (PLAIN) smtp.auth=ron.l.johnson@cox.net Subject: Re: Enforce primary key on every table during dev? To: pgsql-general@lists.postgresql.org References: <161e1761560-58a6-18e4b@webjas-vad211.srv.aolmail.net> <5a1870db-7018-fe15-ac60-ffe37abb7077@cox.net> <5da96fe6-666b-1107-ee76-b464417bd1b7@cox.net> From: Ron Johnson Message-ID: Date: Thu, 1 Mar 2018 13:39:10 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/alternative; boundary="------------513459E5D231866B8B0F4E10" Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is a multi-part message in MIME format. --------------513459E5D231866B8B0F4E10 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit On 03/01/2018 01:05 PM, Melvin Davidson wrote: > > > On Thu, Mar 1, 2018 at 2:00 PM, Ron Johnson > wrote: > > On 03/01/2018 12:32 PM, Daevor The Devoted wrote: > [snip] > >> If your only unique index is a synthetic key, then you can insert the >> same "business data" multiple times with different synthetic keys. > > > -- > Angular momentum makes the world go 'round. > > > *If you are going to go to the trouble of having a surrogate/synthetic > key, then you may as well have a primary key , which is much better. * I completely agree. -- Angular momentum makes the world go 'round. --------------513459E5D231866B8B0F4E10 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit
On 03/01/2018 01:05 PM, Melvin Davidson wrote:


On Thu, Mar 1, 2018 at 2:00 PM, Ron Johnson <ron.l.johnson@cox.net> wrote:
On 03/01/2018 12:32 PM, Daevor The Devoted wrote:
[snip]
If your only unique index is a synthetic key, then you can insert the same "business data" multiple times with different synthetic keys.


--
Angular momentum makes the world go 'round.

If you are going to go to the trouble of having a surrogate/synthetic key, then you may as well have a primary key , which is much better. 

I completely agree.

--
Angular momentum makes the world go 'round.
--------------513459E5D231866B8B0F4E10--