Re: Triggers using PL/pgSQL

From: Ken Hill <ken(at)scottshill(dot)com>
To: Thusitha Kodikara <kthusi(at)yahoo(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Triggers using PL/pgSQL
Date: 2006-07-31 15:47:50
Message-ID: 1154360871.11723.2.camel@ken-laptop
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-php pgsql-sql

On Sun, 2006-07-30 at 21:16 -0700, Thusitha Kodikara wrote:
> Hello,
>
> I am interested in developing some triggers to keep track of records
> that are changed (possibly the changes of one or more specific
> columns). In addition to keeping the new values, I also need to keep
> the old values (may be on a separate table).
>
> Though I have done similar things in other RDBMs using SQL, I find
> doing this in Postgres, a little bit complicated - may be because it
> needs to be done through a separate procedural language and through a
> separate function. The Postgres documentation also didn't provide much
> help ( the examples in C). I was mainly looking for example showing
> how to refer 'OLD' and 'NEW' rows using PL/pgSQL.
>
> Can someone please direct me to some such examples?
>
> Thanks and regards,
> -Thusitha

I too am very interested in this!

-Ken

In response to

Browse pgsql-php by date

  From Date Subject
Next Message John DeSoi 2006-07-31 15:53:46 Re: Triggers using PL/pgSQL
Previous Message Aaron Bono 2006-07-31 14:59:22 Re: Triggers using PL/pgSQL

Browse pgsql-sql by date

  From Date Subject
Next Message John DeSoi 2006-07-31 15:53:46 Re: Triggers using PL/pgSQL
Previous Message Harald Fuchs 2006-07-31 15:30:14 Re: DBD::Pg ... how would I format this prepare?