Re: Dynamic Log tigger (plpgsql) - Mailing list pgsql-general

From Noah Heusser
Subject Re: Dynamic Log tigger (plpgsql)
Date
Msg-id 467B00A3.1010802@heussers.ch
Whole thread Raw
In response to Re: Dynamic Log tigger (plpgsql)  ("Sergey Konoplev" <gray.ru@gmail.com>)
List pgsql-general
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]
>
thx, you are right. These Languages are trusted like pgsql,

Did it in Perl:

      foreach $key (keys %{$_TD->{old}}) {
        if($_TD->{old}{$key} ne $_TD->{new}{$key}){

        }
      }




pgsql-general by date:

Previous
From: Hannes Dorbath
Date:
Subject: Re: Experiences of PostgreSQL on-disk bitmap index patch
Next
From: brian
Date:
Subject: ORDER BY with exception