IMMUTABLE columns in tables? - Mailing list pgsql-general

From Adrian von Bidder
Subject IMMUTABLE columns in tables?
Date
Msg-id 201006142041.46422@fortytwo.ch
Whole thread Raw
Responses Re: IMMUTABLE columns in tables?  (Craig Ringer <craig@postnewspapers.com.au>)
List 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)

Attachment

pgsql-general by date:

Previous
From: Adrian von Bidder
Date:
Subject: thoughts about constraint trigger
Next
From: Dave Page
Date:
Subject: Re: Unable to install pg in Win (MVR error)