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 1erVxE-0005MB-N7 for pgsql-general@arkaria.postgresql.org; Thu, 01 Mar 2018 21:41:32 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1erVxD-00005i-8x for pgsql-general@arkaria.postgresql.org; Thu, 01 Mar 2018 21:41:31 +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 1erVxC-00005X-Th for pgsql-general@lists.postgresql.org; Thu, 01 Mar 2018 21:41:31 +0000 Received: from out5-smtp.messagingengine.com ([66.111.4.29]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1erVxA-0004xx-Ck for pgsql-general@lists.postgresql.org; Thu, 01 Mar 2018 21:41:29 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 990742198D for ; Thu, 1 Mar 2018 16:41:27 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute6.internal (MEProxy); Thu, 01 Mar 2018 16:41:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm2; bh=32efesiBST0NfSew5H8Dq1C+KTSYX jjnOmdQ2lwcNFE=; b=aLSbqMOwXRdFcApzptLZfcXkpGAT7zGc286JBc0NpS2Am qKxQh19try0+V9iZWcUgUpV3UyKtlQUkD1Sp5yyv7SihjDwqoGqEWGWeKAq8Sxhh GxOZ4O20aAJIIozvu3eHXkhFpu+2o8NfGxuWop87vFSznXfokNhj3Al/BBHklp/f 2Cf7+6tiLNKtKD0YnKpFSUNXQgk8/ENIuFu/gbFcleUdsfSknxJDAE5602jrSanK LnobDNeEFEe1GFnzoP4K4SxIldO8Yv25pCtkV1hFddGwmz6RU7wSmevGM8w6wmAE 6JNFX/OCVaGhTlcXJ1Mtn8f7/ssEvWkYyEgPfwV/g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=32efes iBST0NfSew5H8Dq1C+KTSYXjjnOmdQ2lwcNFE=; b=QKvx/a7IRqmvAWxtmBxe6/ dHBgxVDaPan0Gzceo5jXoaV5VD3eY3HtrVsCJJ4wLdLt76s14GFoswR7eDsnEMht a2qBFYnR4HcFOIZZH0JrYALgiM3sP2WoppzF8Bi/Z7emPiDYqDMpjiBOKLXtPtZN 36cXd4H7ybVMCMoXEZf9SSemNfWcG+NOHEwYQfD2YwVLCgkS/ajasc8pz9bwJnM1 mn73sTB2koFyercPCxkJ61IKGh10cfTGxdQnaSR2uCvR9wLsgCKh7+3vL9l8budP InBdIyxRvldtEeXuGkHRzREga9G6U61qHlDgB1CRHg4c2UZz36Gpi5ddSxmF6tLw == X-ME-Sender: Received: from [192.168.1.2] (71-35-123-124.tukw.qwest.net [71.35.123.124]) by mail.messagingengine.com (Postfix) with ESMTPA id 2142F7E3DC for ; Thu, 1 Mar 2018 16:41:27 -0500 (EST) 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> <80d9a83d-fbf4-e4fa-9ccf-9272a074c50d@cox.net> <87230ccb-5b8e-e4ee-d6d5-63a9cbac5793@cox.net> From: Adrian Klaver Message-ID: <915390c7-8a2e-108e-2dba-d4f716464de1@aklaver.com> Date: Thu, 1 Mar 2018 13:41:26 -0800 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: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 03/01/2018 01:26 PM, Ron Johnson wrote: > On 03/01/2018 03:14 PM, Adrian Klaver wrote: >> On 03/01/2018 01:03 PM, Ron Johnson wrote: >>> On 03/01/2018 02:32 PM, David G. Johnston wrote: >> >>> There's always the "account number", which is usually synthetic. >>> Credit Card numbers are also synthetic. >> >> Actually, no: >> >> https://en.wikipedia.org/wiki/Payment_card_number >> >> There is a method to the madness, not just random issuance of numbers. >> It was made it relatively easy for folks to *generate numbers*. Hence >> the addition of CSC codes. > > Right.  And how do the issuers generate the individual account > identifier within their IIN ranges? Who knows, that is their business, though there is nothing to say they don't use some sort of internal 'natural' logic. It has been awhile since we have gone down this rabbit hole on this list, mostly because it is an issue that is usually left at 'we agree to disagree'. Though the thing that always strikes me is the assumption that a number/surrogate key is less 'natural' then some other sort of tag or combination of tags. Because that is what PK's are, a tag to identify a record. > >> >> ICD numbers are (relatively) >>> synthetic, too. >>> >>> But that doesn't mean we have to use them willy-nilly everywhere. > > -- > Angular momentum makes the world go 'round. -- Adrian Klaver adrian.klaver@aklaver.com