Re: Read-only column

From: Doug McNaught <doug(at)mcnaught(dot)org>
To: Claudio Succa <claudio(dot)succa(dot)ml(at)pertel(dot)it>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Read-only column
Date: 2003-12-12 19:11:52
Message-ID: 87llphonpj.fsf@asmodeus.mcnaught.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Claudio Succa <claudio(dot)succa(dot)ml(at)pertel(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jeff Rogers 2003-12-12 19:16:42 functions returning sets
Previous Message cadancer 2003-12-12 19:07:46 Perl "with-perl" configuration option

Browse pgsql-hackers by date

  From Date Subject
Next Message Roderick A. Anderson 2003-12-12 19:24:38 Re: 7.4 build problem on Linux Vserver
Previous Message Alvaro Herrera Munoz 2003-12-12 19:07:54 Re: WITH clause