pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Keith Wong <keith@e-magine.com.au>
To: Carolyn Lu Wong <carolyn@kss.net.au>
To: pgsql-sql@postgresql.org <pgsql-sql@postgresql.org>
Subject: Re: trigger examples
Date: Tue, 03 Oct 2000 23:41:52 +1000
Message-ID: <4.3.2.7.0.20001003233932.00b66768@mail.e-magine.com.au> (raw)
In-Reply-To: <39D98534.31BC8197@kss.net.au>
References: <39D96C98.9C7A6A55@kss.net.au>
	<39D9636B.5B45952C@smartt.com>

This is an example script I use to keep a log of all database operations on 
my tables.
Hope it helps.

At 05:05 PM 3/10/2000 +1000, Carolyn Lu Wong wrote:
>drfrog@smartt.com wrote:
> >
> > Carolyn Lu Wong wrote:
> > >
> > > I need to write a trigger to create a new record in log table if it's a
> > > new record or if column A and B changes. Can someone give me an example
> > > how to do this.
> > >
> > > Are there any sites that gives trigger examples??
> > >
> > > Thanks.
> >
> > the fulltextindex in the contrib dir gives an example
>
>The example uses C. Is it possible to create the trigger with plpsql
>function?

Attachments:

  table_customer.sql (application/octet-stream, 4.6K) download

view thread (4+ messages)

Message-ID: <4.3.2.7.0.20001003233932.00b66768@mail.e-magine.com.au>
Permalink:  ../4.3.2.7.0.20001003233932.00b66768@mail.e-magine.com.au/
Also on:    postgresql.org/message-id/4.3.2.7.0.20001003233932.00b66768@mail.e-magine.com.au

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: keith@e-magine.com.au, carolyn@kss.net.au
  Subject: Re: trigger examples
  In-Reply-To: <4.3.2.7.0.20001003233932.00b66768@mail.e-magine.com.au>
  References: <39D96C98.9C7A6A55@kss.net.au> <39D9636B.5B45952C@smartt.com> <4.3.2.7.0.20001003233932.00b66768@mail.e-magine.com.au>

* 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