Re: Primary keys and composite unique keys(basic question)

From: Ron <ronljohnsonjr(at)gmail(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Primary keys and composite unique keys(basic question)
Date: 2021-04-07 18:35:15
Message-ID: 09cdd33e-24ed-f51c-84fd-1955c42a0d84@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 4/7/21 1:16 PM, Rob Sargent wrote:
> 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(at)gmail(dot)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!

Call a function which reads the next value from the sequence, appends the
check digit and returns that number.  We were doing that 25 years ago.

--
Angular momentum makes the world go 'round.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jagmohan Kaintura 2021-04-08 02:37:48 could not receive data from client: Connection reset by peer
Previous Message Rob Sargent 2021-04-07 18:16:41 Re: Primary keys and composite unique keys(basic question)