pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bradley Kieser <brad@kieser.net>
To: pgsql-sql@postgresql.org
Subject: Rule to fill in value on column on insert
Date: Mon, 10 Jun 2002 09:25:52 +0100
Message-ID: <3D046290.2060906@kieser.net> (raw)

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




view thread (3+ messages)  latest in thread

Message-ID: <3D046290.2060906@kieser.net>
Permalink:  ../3D046290.2060906@kieser.net/
Also on:    postgresql.org/message-id/3D046290.2060906@kieser.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: brad@kieser.net
  Subject: Re: Rule to fill in value on column on insert
  In-Reply-To: <3D046290.2060906@kieser.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox