committing a type to never change

From: "rob" <rob_mail(at)fastmail(dot)fm>
To: <pgsql-novice(at)postgresql(dot)org>
Subject: committing a type to never change
Date: 2002-03-04 04:18:24
Message-ID: 000c01c1c333$a20a0a80$0400000a@silence
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

How do I apply the following constraint/rule?

If I have the following relation R1(a1, a2) and I want to enforce a rule where when a tuple in R1 is created the
attribute a2 can not ever be updated (after it's been given it's initial value by the insert of the tuple).

So basically a2 is not changable after it's created.

How is this done in postgresql?

Thanks

Rob

Browse pgsql-novice by date

  From Date Subject
Next Message Ivan Horvath 2002-03-04 07:45:49 Re: timestamp value
Previous Message rob 2002-03-04 02:17:12 PL/pgSQL syntax documentation