01.05.2011 12:58, Basil Bourque wrote:
Hoorah! I was able to complete my single PL/pgSQL function to create history records
tracking individual field value changes generically for all my tables. Some developers
call this an audit trail, though an accountant might say otherwise.
I made
On Wed, Aug 24, 2011 at 1:03 PM, ivan_14_32 ivan_14...@mail.ru wrote:
01.05.2011 12:58, Basil Bourque wrote:
Hoorah! I was able to complete my single PL/pgSQL function to create
history records tracking individual field value changes generically for all
my tables. Some developers call this an
On 04/28/2011 10:46 PM, Basil Bourque wrote:
In PL/pgSQL, how does one generically access the fields of the OLD or NEW
record?
I've tried code such as this:
'NEW.' || quote_ident( myColumnNameVar ) || '::varchar'
But when run by an EXECUTE command, I get errors such as:
ERROR: missing
Hoorah! I was able to complete my single PL/pgSQL function to create history
records tracking individual field value changes generically for all my tables.
Some developers call this an audit trail, though an accountant might say
otherwise.
Thanks for all the replies.
Special thanks to John
In PL/pgSQL, how does one generically access the fields of the OLD or NEW
record?
I've tried code such as this:
'NEW.' || quote_ident( myColumnNameVar ) || '::varchar'
But when run by an EXECUTE command, I get errors such as:
ERROR: missing FROM-clause entry for table old
SQL state:
On Thu, Apr 28, 2011 at 12:46:50PM -0700, Basil Bourque wrote:
In PL/pgSQL, how does one generically access the fields of the OLD or NEW
record?
I've tried code such as this:
'NEW.' || quote_ident( myColumnNameVar ) || '::varchar'
But when run by an EXECUTE command, I get errors such
On Apr 28, 2011, at 3:46 PM, Basil Bourque wrote:
It seems that I cannot get PL/pgSQL to interpret the text of NEW. + column
name as text.
My goal is to loop each field in a trigger, comparing the OLD. NEW.
values of each field. If different I want to log both values in a