Re: field incrementing in a PL/pgSQL trigger

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: field incrementing in a PL/pgSQL trigger
Дата
Msg-id 28415.1098574978@sss.pgh.pa.us
обсуждение исходный текст
Ответ на field incrementing in a PL/pgSQL trigger  ("Tim Vadnais" <tvadnais@earthlink.net>)
Список pgsql-general
"Tim Vadnais" <tvadnais@earthlink.net> writes:
> My questions are: Is there a way I can dynamically determine the number of
> fields in the row that is being maintained. (a function much like:
> PQnfields(const PGresult *); )
> Then I need a way to get the name of the field (using a function much like:
> PQfname(const PGresult *, int); )

plpgsql isn't capable of doing dynamic field access.  You could do this
in pltcl, I think, and definitely in C.  There are some related examples
in contrib/spi/.

            regards, tom lane

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

Предыдущее
От: Bruno Wolff III
Дата:
Сообщение: Comment on timezone and interval types
Следующее
От: Tom Lane
Дата:
Сообщение: Re: '1 year' = '360 days' ????