IMMUTABLE columns in tables?

From: Adrian von Bidder <avbidder(at)fortytwo(dot)ch>
To: pgsql-general(at)postgresql(dot)org
Subject: IMMUTABLE columns in tables?
Date: 2010-06-14 18:41:45
Message-ID: 201006142041.46422@fortytwo.ch
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Heyho!

(Ok, seems to be feature wish day ...)

I was wondering if others would find an IMMUTABLE (or whatever) column
constraint useful as well. Semantics would (obviously?) be to disallow
changing the value of this column after insert.

I realize that this is possible via triggers, and with the recent
possibility of having triggers fire only on changes to certain columns it's
even (presumably) not much runtime overhead, but creating triggers is very
verbose and doesn't make the db schema very readable.

cheers
-- vbi

--
Could this mail be a fake? (Answer: No! - http://fortytwo.ch/gpg/intro)

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Dave Page 2010-06-14 18:43:15 Re: Unable to install pg in Win (MVR error)
Previous Message Adrian von Bidder 2010-06-14 18:33:00 thoughts about constraint trigger