Обсуждение: Access dynamic NEW.column_name in trigger?

Поиск
Список
Период
Сортировка

Access dynamic NEW.column_name in trigger?

От
Nick
Дата:
This is a very abbr version of my problem, but what would be the best
way to do this...

DECLARE
  column_name_var TEXT;
BEGIN
  RETURN NEW.column_name_var;
END;


Re: Access dynamic NEW.column_name in trigger?

От
Scott Marlowe
Дата:
On Fri, Oct 9, 2009 at 8:23 PM, Nick <nboutelier@gmail.com> wrote:
> This is a very abbr version of my problem, but what would be the best
> way to do this...
>
> DECLARE
>  column_name_var TEXT;
> BEGIN
>  RETURN NEW.column_name_var;
> END;

plpgsql doesn't really do dynamic column names.  You'll need to
implement it in C, perl, or tcl really.