Обсуждение: using DDL in a function

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

using DDL in a function

От
Dmitriy Agafonov
Дата:
I would like to alter  a table (add column) when a row is inserted into
another one, but as far as I understand no DDL statements can appear in
the pgplsql functions. Is there any way I can do that?
I need more than that actually. The names of the table to be altered and
the column which has to be added (and also type and other attributes)
should come from the row being inserted. Does PosgtreSQL have some kind
of Dynamic SQL?
Thank you,
Dmitriy Agafonov.