Re: Dont allow updation for few columns in a record.

From: HK <harikrishnan(at)midascomm(dot)com>
To: Bruno Wolff III <bruno(at)wolff(dot)to>
Cc: <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Dont allow updation for few columns in a record.
Date: 2003-07-11 05:13:38
Message-ID: Pine.LNX.4.33.0307111041530.2991-100000@mallard.midascomm.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

hi all,
thanx bruno.
If we dont grant update access to the table, i will not be able to do any
updations.
I only want to prevent a particular column from being updated.
Is there any way??
TIA.

On Wed, 9 Jul 2003, Bruno Wolff III wrote:

> On Wed, Jul 09, 2003 at 11:40:24 +0530,
> HK <harikrishnan(at)midascomm(dot)com> wrote:
> > Hi all,
> > Is it possible to say that once a record is inserted into the
> > table, nobody can update some particular columns in that record.
> >
> > (eg)
> > table
> > ------
> > prod_id prod_name prod_desc
> > 1 name1 desc1
> > 2 name2 desc2
> >
> > In this table i dont want to allow updation of the prod_name column.
> >
> > I can write a trigger to do this job, but is there any way to specify
> > during the table creation time itself that these columns cannot be
> > altered.
>
> One option would be not to grant UPDATE access to the table.
>

--
regards,
hari
__
/ / __ _ _ _ _ __ __ -o)
/ /__ / / / \\// //_// \\ \\/ / /\\\\ Making things happen
/____/ /_/ /_/\\/ /___/ /_/\\_\\ _\\_v-

-------------------------------------------------------------------

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Martin Foster 2003-07-11 06:09:38 Re: [NOVICE] Extreme high load averages
Previous Message Martin Foster 2003-07-11 00:23:11 Re: [NOVICE] Extreme high load averages