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

From Claudio Succa
Subject Re: Read-only column
Date
Msg-id 1071328797.696.19.camel@master.to1.pertel.it
Whole thread Raw
In response to Re: Read-only column  (Doug McNaught <doug@mcnaught.org>)
Responses Re: Read-only column
List pgsql-general
Il ven, 2003-12-12 alle 20:11, Doug McNaught ha scritto:
> 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

Thanks a lot Doug.

(Not to reinvent the wheel, do you know where I could find a suitable
function to use in the trigger?)

Claudio

--
Claudio Succa
PERTEL - Torino - Italy
+39-011-437.4141
http://www.pertel.it
http://www.uniassist.it



pgsql-general by date:

Previous
From: snpe
Date:
Subject: 7.5 features
Next
From: Chris Travers
Date:
Subject: Re: [NOVICE] PostgreSQL Training