From: Guillaume Lelarge <guillaume@lelarge.info>
To: Ricardo Bayley <ricardo.bayley@gmail.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Trigger: Column Update
Date: Fri, 12 Nov 2010 18:49:52 +0100
Message-ID: <4CDD7E40.2020401@lelarge.info> (raw)
In-Reply-To: <AANLkTikj3q=rg-Cmtp8DktVkS7gAvO-tJQ+=4G0R7ECj@mail.gmail.com>
References: <AANLkTikj3q=rg-Cmtp8DktVkS7gAvO-tJQ+=4G0R7ECj@mail.gmail.com>
Le 12/11/2010 18:37, Ricardo Bayley a écrit :
> Hi,
>
> I am wondering if there is a way to identify which columns have been
> modified. Is there some sort of TG_TABLE_NAME, which states the
> modified columns ?
Nope. You should check yourself.
> Or should we check this ourselves doing something like OLD.columnA !=
> NEW.columnA ?
Use IS DISTINCT OF instead of = to deal with NULL values.
--
Guillaume
http://www.postgresql.frhttp://dalibo.com
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-admin@postgresql.org
Cc: guillaume@lelarge.info, ricardo.bayley@gmail.com
Subject: Re: Trigger: Column Update
In-Reply-To: <4CDD7E40.2020401@lelarge.info>
* 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