Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lUCSf-0003OE-TU for pgsql-general@arkaria.postgresql.org; Wed, 07 Apr 2021 17:59:30 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lUCSe-00058H-HW for pgsql-general@arkaria.postgresql.org; Wed, 07 Apr 2021 17:59:28 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lUCSe-00056T-2g for pgsql-general@lists.postgresql.org; Wed, 07 Apr 2021 17:59:28 +0000 Received: from mail-ot1-x32c.google.com ([2607:f8b0:4864:20::32c]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1lUCSb-0004DL-L7 for pgsql-general@lists.postgresql.org; Wed, 07 Apr 2021 17:59:26 +0000 Received: by mail-ot1-x32c.google.com with SMTP id 68-20020a9d0f4a0000b02901b663e6258dso18862685ott.13 for ; Wed, 07 Apr 2021 10:59:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language; bh=QVo08w8nCRCk4GSaFxS8TqqxOQgEnsTHCGF97Xk6wFw=; b=Ulnbt+mkeXzBsQ1HdKzfaEWyzwgtXL6RbhP3Q3JE7bod3CoaKk8Ua1Ac3RGoBMA9n2 lN1NKN28YbiyUWIICKjj6QJWAyFai+lUsnRyPUSFxFZ9LiCK05KgL309GfDqv3B4X6AA wzghnX5cQj62GBOldWkSAUzjtFzEqNjtuGjE8SoMuC8orXeG5HIlgBZ6m0i+GgK+9r0s mWjqjP3CGhTmVE6aEs0Muh1HH9Fgq0iKcE3uMHOHs+ohOvcUPNKfF1E/FEZGYPCNj62p 95hUGiCqp71dyAQ9DG9IzXjmo3auc++v/ePOJ76uom5qTya3KLLx6o8Ih6SCYdbbUiyt wmTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=QVo08w8nCRCk4GSaFxS8TqqxOQgEnsTHCGF97Xk6wFw=; b=XpK6t6pO7i8CWgIWfo80ng75/Yn8eB1Vy6Z55i/kLsSNcGVDJ4aTwgyW0pMKwTnx0A kbAvgzF2sDS5KAX11c/DmK9LRbOwTxazk2KmXiZktbtJ70u6UOaPoSJXTV6Ch8fTJI4P qGUK6zRqls9F+EOSOMtwvAEgokTUaSOo13ZBJHlxYFMWU3gtATS3P47jAHpsESeyDe+1 5CVRXO7u99shc5L2CT+MXWmDuQsl0uJjGsfztsAC71LaOA1raTw30KG2L9cEVXOZ2bdy x3kmuP/6iz3jOpkg6UbxVbvBijksPqTeW3zRdFZm8vY+o0XJEMy1N13HFuvitWzuEHuv c/Vw== X-Gm-Message-State: AOAM5335p8BbSf0uqDJGI/ksB8+vpXM/RshtQdqE8vTi8IQeSkA8SbI1 ttRgUmL8eNUj3c5GsFtwY4yTP79e7Ak= X-Google-Smtp-Source: ABdhPJyYmR8Lycu3zcaQ4Q+YM+M+9tV9JhYgg28lU/tMN6apGdju48odMolwFALXct+sV/f5ZWeK2A== X-Received: by 2002:a05:6830:10d3:: with SMTP id z19mr4058033oto.362.1617818364485; Wed, 07 Apr 2021 10:59:24 -0700 (PDT) Received: from [192.168.88.10] (ip174-67-141-204.no.no.cox.net. [174.67.141.204]) by smtp.googlemail.com with ESMTPSA id h12sm5793096ote.75.2021.04.07.10.59.23 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 07 Apr 2021 10:59:23 -0700 (PDT) Subject: Re: Primary keys and composite unique keys(basic question) To: pgsql-general@lists.postgresql.org References: <3fcf7329-378d-6982-89d9-a3f28ada0d47@gmail.com> <9FFB0361-5256-4175-9C51-5D9F6E6969D9@gmail.com> From: Ron Message-ID: <8ab79f7a-f5bf-98c4-03e8-b3918c542594@gmail.com> Date: Wed, 7 Apr 2021 12:59:22 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <9FFB0361-5256-4175-9C51-5D9F6E6969D9@gmail.com> Content-Type: multipart/alternative; boundary="------------A2F881E9C63B628FA235DF07" Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------A2F881E9C63B628FA235DF07 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit On 4/7/21 11:35 AM, Rob Sargent wrote: > >> On Apr 7, 2021, at 10:17 AM, Ron wrote: >> >>  On 4/5/21 9:37 PM, Rob Sargent wrote: >>>> It's a small thing, but UUIDs are absolutely not memorizable by >>>> humans; they have zero semantic value.  Sequential numeric identifiers >>>> are generally easier to transpose and the value gives some clues to >>>> its age (of course, in security contexts this can be a downside). >>>> >>> I take the above as a definite plus.  Spent too much of my life >>> correcting others’ use of “remembered” id’s that just happened to >>> perfectly match the wrong thing. >> >> People seem to have stopped appending check digits to identifiers about >> 20 years ago, and I'm not sure why. >> > No the problem is “start from one”. User has item/I’d 10875 in hand and > types in 10785 which of course in a sequence supplied ID steam is > perfectly valid and wrong.  Really hard to track down. That's my point.  Adding a check digit (turning 10875 into 108753) would have caught that, since 107853 does not match 107854 (which is 10785 with a check digit added). -- Angular momentum makes the world go 'round. --------------A2F881E9C63B628FA235DF07 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit On 4/7/21 11:35 AM, Rob Sargent wrote:

On Apr 7, 2021, at 10:17 AM, Ron <ronljohnsonjr@gmail.com> wrote:

 On 4/5/21 9:37 PM, Rob Sargent wrote:
It's a small thing, but UUIDs are absolutely not memorizable by
humans; they have zero semantic value.  Sequential numeric identifiers
are generally easier to transpose and the value gives some clues to
its age (of course, in security contexts this can be a downside).

I take the above as a definite plus.  Spent too much of my life correcting others’ use of “remembered” id’s that just happened to perfectly match the wrong thing.

People seem to have stopped appending check digits to identifiers about 20 years ago, and I'm not sure why.

No the problem is “start from one”. User has item/I’d 10875 in hand and types in 10785 which of course in a sequence supplied ID steam is perfectly valid and wrong.  Really hard to track down.

That's my point.  Adding a check digit (turning 10875 into 108753) would have caught that, since 107853 does not match 107854 (which is 10785 with a check digit added).

--
Angular momentum makes the world go 'round.
--------------A2F881E9C63B628FA235DF07--