Immutable field/cell in Postgres Is there a way to create an immutable field/cell in a Postgres record? AKA, only allow the field to be written once, perhaps just on insert?
Use case: I have a &quot;uuid&quot; field for a record, and it should never ever be changed (same with the PK as well).
There are several techniques for that:

Using column permissions, grant UPDATE only on the other columns.

Create an UPDATE trigger that throws an exception when OLD.id &lt;&gt; NEW.id.


Note that all these measures can never deny the table owner access, since the owner can always change permissionsand drop triggers.