Re: Read-only column - Mailing list pgsql-general

From Doug McNaught
Subject Re: Read-only column
Date
Msg-id 87llphonpj.fsf@asmodeus.mcnaught.org
Whole thread Raw
In response to Read-only column  (Claudio Succa <claudio.succa.ml@pertel.it>)
Responses Re: Read-only column
List pgsql-general
Claudio Succa <claudio.succa.ml@pertel.it> writes:

> Given a table like the following:
>
> CREATE TABLE mytable (
>     progr integer PRIMARY KEY,
>     record_creation_date date DEFAULT current_date,
>     ...
>     other columns
>     ...
> );
>
> is there a way to deny any modifications to 'record_creation_date'
> without using a view?

Sure, you can use a trigger.

-Doug

pgsql-general by date:

Previous
From: Claudio Succa
Date:
Subject: Read-only column
Next
From: Jon Earle
Date:
Subject: Error with table