In an attempt to throw the authorities off his trail, pgsql-general@list.coretech.ro ("pgsql-general@list.coretech.ro")
transmitted:
> I have a somehow related question to this topic: is it possible to
> know (in postgresql) if an update on a column is absolute (set col =
> 3) or relative to it's previous value (set col = col + 3)
> in a trigger one have access to OLD row values and NEW row values, but
> no correlation between the two. is this type of information available
> somewhere in postgresql ?
No, that's not available in any direct fashion.
I understand that in some replication systems (Sybase has been the
name bandied about in this context), you can mark particular table
columns as being ones where "deltas" should be computed.
In effect, you note down somewhere that certain columns represent
"balances," which implies that changes should always be regarded as
"deltas."
It seems like it ought to work...
--
(format nil "~S@~S" "cbbrowne" "gmail.com")
http://cbbrowne.com/info/x.html
If you're not part of the solution, you're part of the precipitate.