From: Andrew Sullivan <ajs@crankycanuck.ca>
To: pgsql-sql@postgresql.org
Subject: Re: Fwd: Start up question about triggers
Date: Mon, 26 Jun 2006 06:43:12 -0400
Message-ID: <20060626104312.GB15992@phlogiston.dyndns.org> (raw)
In-Reply-To: <bf05e51c0606232029j2f468ceapfbb583278be41504@mail.gmail.com>
References: <006901c696c1$d2af82d0$6400a8c0@Dell4500>
<200606231548.k5NFmhSW028183@auth-smtp.hol.gr>
<20060623173504.GC12422@phlogiston.dyndns.org>
<17077.1151084888@sss.pgh.pa.us>
<bf05e51c0606232029j2f468ceapfbb583278be41504@mail.gmail.com>
On Fri, Jun 23, 2006 at 10:29:33PM -0500, Aaron Bono wrote:
>
> What I really cannot find is a way to _dynamically_ in the trigger ask what
> COLUMNS are in OLD and NEW. If we had:
All of the columns, of course. When the tuple is UPDATEd, even if
you did not mention some columns in your UPDATE, there is an OLD
value and a NEW value. They're the same.
> I wish I had more experience with stored procedures - I know what I would
> try to do, just not if it is possible or how to implement it.
I think what Tom (but I don't want to put words in his mouth) and,
certainly, I have been saying is that your plan to get the list of
transform commands is fundamentally misguided. If you want to track
changes, then that's what you should do: track what changed.
Note that there is a project that already, in fact, does this for you
as part of how it works: Slony-I.
A
--
Andrew Sullivan | ajs@crankycanuck.ca
When my information changes, I alter my conclusions. What do you do sir?
--attr. John Maynard Keynes
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: ajs@crankycanuck.ca
Subject: Re: Fwd: Start up question about triggers
In-Reply-To: <20060626104312.GB15992@phlogiston.dyndns.org>
* 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