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-22 Thread Jim Nasby
On Jun 16, 2007, at 6:26 AM, Noah Heusser wrote: 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) C

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-20 Thread Sergey Konoplev
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] -- Regards, Sergey Konop

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

Re: [GENERAL] Dynamic Log tigger (plpgsql)

2007-06-19 Thread Sibte Abbas
On 6/16/07, Noah Heusser <[EMAIL PROTECTED]> wrote: 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 ( operationCHA

[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