Nested SPI_exec's

Поиск
Список
Период
Сортировка
От Jason Godden
Тема Nested SPI_exec's
Дата
Msg-id 200310061830.34357.jasongodden@optushome.com.au
обсуждение исходный текст
Ответы Re: Nested SPI_exec's
Список pgsql-general
Hi All,

I'm in the process of moving a rather complicated plpgsql stored procedure to
a C module and I'm curious about how to implement the for each row syntax in
C.  My understanding is that if you perform an SPI_exec whilst looping
through the results of another exec the allocated SPITupleTable will be
automatically unallocated.  Is this correct or am I way off here and it's
actually safe to iterate through the tuples in an SPITupleTable and perform
additional SPI_exec's?  Thinking about this now it probably is but I thought
it better to ask.

The other query I have relates to the transaction 'safe-ness' of a C module.
If I initiate all of this within a transaction (from outside the C module),
is everything within the SPI module automagically encapsulated with the
transaction or do I have to manage the transaction from within the SPI
module?

Rgds,

Jason

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

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: Tree traversing. Like Oracle START WITH...CONNECT BY
Следующее
От: CSN
Дата:
Сообщение: orphaned psql's