Re: nested SQL with SPI

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: nested SQL with SPI
Дата
Msg-id 5864.999544591@sss.pgh.pa.us
обсуждение исходный текст
Ответ на nested SQL with SPI  (Markus Wagner <wagner@imsd.uni-mainz.de>)
Ответы Re: nested SQL with SPI
Список pgsql-general
Markus Wagner <wagner@imsd.uni-mainz.de> writes:
> can I nest SQL statements with SPI within trigger functions?
> How can I distinguish the results in SPI_tuptable?

Yes, but remember that SPI_tuptable is just a global variable.  What
you'll probably need to do is copy it and associated globals into locals
of your function as soon as SPI_exec returns, and then use the local
values to access that result.  In this way, nested executions of
SPI_exec won't confuse your access to your result.

            regards, tom lane

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

Предыдущее
От: Fernando Schapachnik
Дата:
Сообщение: Re: SHOW
Следующее
От: Tom Lane
Дата:
Сообщение: Re: ERROR: Function 'format_type(oid, int4)' does not exist