From: | Andrew Sullivan <ajs(at)crankycanuck(dot)ca> |
---|---|
To: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: Fwd: Start up question about triggers |
Date: | 2006-06-26 10:43:12 |
Message-ID: | 20060626104312.GB15992@phlogiston.dyndns.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
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(at)crankycanuck(dot)ca
When my information changes, I alter my conclusions. What do you do sir?
--attr. John Maynard Keynes
From | Date | Subject | |
---|---|---|---|
Next Message | filippo | 2006-06-26 13:39:11 | join two tables with sharing some columns between two |
Previous Message | Aaron Bono | 2006-06-24 03:29:33 | Re: Fwd: Start up question about triggers |