pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Craig Servin <cservin@cromagnon.com>
To: pgsql-sql@postgresql.org
Subject: NEW and OLD as ROWS
Date: Wed, 3 Aug 2005 12:52:24 -0500
Message-ID: <200508031252.24844.cservin@cromagnon.com> (raw)

I am writing an update trigger that I want to fire when any field changes.  It 
looks like two ROWS can be compared very easily, but not the two RECORDS OLD 
and NEW.

Is there a way to do:

NEW IS DISTINCT FROM OLD

in a trigger?

This would help me not have to write a specific trigger for each table.

Thanks,

Craig



view thread (2+ messages)  latest in thread

Message-ID: <200508031252.24844.cservin@cromagnon.com>
Permalink:  ../200508031252.24844.cservin@cromagnon.com/
Also on:    postgresql.org/message-id/200508031252.24844.cservin@cromagnon.com

 · 

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: cservin@cromagnon.com
  Subject: Re: NEW and OLD as ROWS
  In-Reply-To: <200508031252.24844.cservin@cromagnon.com>

* 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