Re: Immutable attributes? - Mailing list pgsql-general

From David Fetter
Subject Re: Immutable attributes?
Date
Msg-id 20050424215351.GA31885@fetter.org
Whole thread Raw
In response to Immutable attributes?  (Stephane Bortzmeyer <bortzmeyer@nic.fr>)
Responses Re: Immutable attributes?  (Stephane Bortzmeyer <bortzmeyer@nic.fr>)
List pgsql-general
On Sun, Apr 24, 2005 at 09:26:49PM +0200, Stephane Bortzmeyer wrote:
> To protect the database from programming errors (there is a team
> working on the project and some beginners may produce bugs), I would
> like to flag some attributes as immutable, meaning non modifiable in
> an UPDATE. (Typical examples are ID or creation time.)
>
> Currently, I use triggers:

You could use RULEs instead, but the effect would be similar.

> PostgreSQL 7.4, switching to 8.0 would be difficult.

Now is easier than later.

Cheers,
D
--
David Fetter david@fetter.org http://fetter.org/
phone: +1 510 893 6100   mobile: +1 415 235 3778

Remember to vote!

pgsql-general by date:

Previous
From: David Roussel
Date:
Subject: Re: Table modifications with dependent views - best practices?
Next
From: Rajiv Verma
Date:
Subject: SQLException "Connection is closed. Operation is not permitted"