Re: [GENERAL] Dynamic Log tigger (plpgsql)

2007-06-25 Thread Noah Heusser
How can I do "OLD.columnName != NEW.columnName" if I don't know what the columnNames are at Compile Time? I have the columnName in a variable. Are you trying to do this from a plpgsql function? If so then I think you should try to do this from a C function. With C functions you will get more

Re: [GENERAL] Dynamic Log tigger (plpgsql)

2007-06-21 Thread Noah Heusser
Sergey Konoplev schrieb: My Question: How can I do "OLD.columnName != NEW.columnName" if I don't know what the columnNames are at Compile Time? I have the columnName in a variable. I suggest you use plpython. In this case you'll be able to do it. TD['old'][colNameVar] != TD['new'][colNameVar]

Re: [GENERAL] Dynamic Log tigger (plpgsql)

2007-06-19 Thread Noah Heusser
How can I do "OLD.columnName != NEW.columnName" if I don't know what the columnNames are at Compile Time? I have the columnName in a variable. Are you trying to do this from a plpgsql function? If so then I think you should try to do this from a C function. With C functions you will get more

[GENERAL] Dynamic Log tigger (plpgsql)

2007-06-18 Thread Noah Heusser
Hi I want to implement a trigger-function witch can fill the following table. Each data manipulation (INSERT, UPDATE or DELETE) gets logged. The function should work as trigger on diffrent tables. CREATE TABLE logtable ( operationCHAR(6) CHECK (change_type IN ('DELETE', 'INSERT', 'UPDAT