dynamic field names in a function.

Поиск
Список
Период
Сортировка
От Soma Interesting
Тема dynamic field names in a function.
Дата
Msg-id 5.0.2.1.0.20010329142546.02a54ea8@pop.telus.net
обсуждение исходный текст
Ответы Re: dynamic field names in a function.
Список pgsql-general
I want to be able to reference NEW.field_0 though NEW.field_x where x is
coming from NEW.qty in a FOR loop of pl/pgsql function. Is this possible?

In other words:

FOR j IN 0..NEW.str LOOP

    ans := ''q'' || i || ''a'' || j;
    cor := ''q'' || i || ''c'' || j;
    eval := 'q'' || i || ''e'' || j;

    IF NEW.ans = NEW.cor
    THEN NEW.eval := 1;
    END IF;

END LOOP;


В списке pgsql-general по дате отправления:

Предыдущее
От: Martín Marqués
Дата:
Сообщение: database dirs very stange on solaris
Следующее
От: Alexey Rodriguez Yakushev
Дата:
Сообщение: Re: Consistent pg_dump's