Re: explicit-locking.html "key values" reference

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: jian he <jian(dot)universality(at)gmail(dot)com>
Cc: pgsql-general list <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: explicit-locking.html "key values" reference
Date: 2023-05-27 03:20:31
Message-ID: CAKFQuwbEFuHrg0QvmPBOM-BpewVVnNomx8DVqZWLdgF+Auc5hg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, May 26, 2023 at 8:02 PM jian he <jian(dot)universality(at)gmail(dot)com> wrote:

>
> I still feel confused about "the key values".
>

The "key" here is the Foreign Key relationship. In short, FOR NO KEY
UPDATE, promises that PK/FK values on the table will not be changed. Only
non-FK/PK columns can be changed. In neither case may the row be removed
either since that would necessitate changing the key to "non-existent".
However, the "UPDATE" part basically means "I am going to update some other
column". On the KEY SHARE side you basically get "I only care that this
row/relationship continues to exist, you may change other attributes".

David J.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message 文一 2023-05-29 01:24:39 A question about generate_series
Previous Message jian he 2023-05-27 03:02:32 explicit-locking.html "key values" reference