Immutable field/cell in Postgres
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.