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 1lUClY-0004DS-C5 for pgsql-general@arkaria.postgresql.org; Wed, 07 Apr 2021 18:19:00 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lUClX-0007QS-AK for pgsql-general@arkaria.postgresql.org; Wed, 07 Apr 2021 18:18:59 +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 1lUClW-0007Mj-RC for pgsql-general@lists.postgresql.org; Wed, 07 Apr 2021 18:18:59 +0000 Received: from mail-pg1-x52d.google.com ([2607:f8b0:4864:20::52d]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1lUClU-0004M4-Mn for pgsql-general@lists.postgresql.org; Wed, 07 Apr 2021 18:18:57 +0000 Received: by mail-pg1-x52d.google.com with SMTP id w10so8199120pgh.5 for ; Wed, 07 Apr 2021 11:18:56 -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=I14cU63ygY7EKJmcz4MXRi+Pw2tMdTFyK7TN+l1O6Ug=; b=XyTHSPgZOBUJxQ+0OxTUJffSd+zYc6PPH9V7069qWlx4GuKIB42UY87Z82AAFhmues 4tSWSXO6TUZ8Ydmyiv9rsVRH55Bl2RoRtZw9hPMR2zOKT77+JM4lrzGUHy8YvW96IX5z htqeClggW22bLPxPGQX4w4yB54fc31GW4Z/XJF9MJ/iCtEb8CrEDZ9RS7QRSMN+kIeyT 0ehM4KRmljo4cp0tLsgraXfvtOM/YCwgDsenEiJn5eZZ588Nb+npLrAG82XBwWVy979l vLK4eHDmh7Gt2+JkCNooYBiLOZnhEnu90pYHvfXuA9n2trA2gooTYm1c4gSl49HqKb0W JwxQ== 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=I14cU63ygY7EKJmcz4MXRi+Pw2tMdTFyK7TN+l1O6Ug=; b=skMTCo6BVbApXxcDYS/nEUwtmDGpwJuhAXVB54JQPpkDv5aDfgYry5pmebAmHdyxvu UfPgliMIKxz04YWFcz3UCdqlV8gR9T2fcObQhofFR+KjESoex3EOMYpBIaYxs1o4uO5D IgZ7QWdueCVEX8opaXlrzGtNXPKFvwqWIi12Guwmj/21uxPT36d/S+BSJ/aLCKFUz3YM B7xoWVdbvpZVxFOT50MOlqKBePu3qvBPzH5qpuvfTJ3eJ3P8+ngX3c2BX84Cpyf8Y3WD ilwHmkl3ENJa5MVc5KC5UjLfWrTAX5jK0bPVJj8+ZoxzrMBxALfi1mpO/4n1Ovc1T8s0 8+Sg== X-Gm-Message-State: AOAM530cG/FuMY5RTk2NhqnIkT7zCnhRqbVc0+LdIW+WZUvgYvsyl29D x0NM7iSs5oieQGW1axGZhuiU2na5e6Q= X-Google-Smtp-Source: ABdhPJwk+lO6EN4EYcCfmLUXtRVBRAAnyfx+UcJPfPYq+XbRZSXFCk6V1kwiNCkulHGJRe3GNh0qQA== X-Received: by 2002:a62:c1c2:0:b029:241:8abb:8b0f with SMTP id i185-20020a62c1c20000b02902418abb8b0fmr4244851pfg.9.1617819535254; Wed, 07 Apr 2021 11:18:55 -0700 (PDT) Received: from [10.128.48.133] ([155.98.131.5]) by smtp.gmail.com with ESMTPSA id c193sm22371085pfc.180.2021.04.07.11.18.54 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 07 Apr 2021 11:18:54 -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> <8ab79f7a-f5bf-98c4-03e8-b3918c542594@gmail.com> From: Rob Sargent Message-ID: Date: Wed, 7 Apr 2021 12:16:41 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <8ab79f7a-f5bf-98c4-03e8-b3918c542594@gmail.com> Content-Type: multipart/alternative; boundary="------------8447825B4758630A33BC17D7" Content-Language: en-CA 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. --------------8447825B4758630A33BC17D7 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit On 4/7/21 11:59 AM, Ron wrote: > 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). Well you forget that 108753 is also a number in the series from 1 to maxint.   Maybe you're on to something though: a checksum dispensing sequence! --------------8447825B4758630A33BC17D7 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit
On 4/7/21 11:59 AM, Ron wrote:
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).
Well you forget that 108753 is also a number in the series from 1 to maxint.   Maybe you're on to something though: a checksum dispensing sequence!
--------------8447825B4758630A33BC17D7--