Rule to fill in value on column on insert

From: Bradley Kieser <brad(at)kieser(dot)net>
To: pgsql-sql(at)postgresql(dot)org
Subject: Rule to fill in value on column on insert
Date: 2002-06-10 08:25:52
Message-ID: 3D046290.2060906@kieser.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

How do I create a rule that will set a column to a particular value upon
insert? It's for use within an audit trail and we want to prevent any
possibility of some rogue code setting it to an incorrect value (it's a
time stamp) so we don't want to use default values.

In general, though, it would be handy to know how to do this as there
are many uses for it!

Thanks,

Brad

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Christopher Kings-Lynne 2002-06-10 08:44:33 Re: Rule to fill in value on column on insert
Previous Message Ian Cass 2002-06-09 20:13:46 Re: select failure