Re: creating WITH HOLD cursors using SPI - Mailing list pgsql-hackers

From Abhijit Menon-Sen
Subject Re: creating WITH HOLD cursors using SPI
Date
Msg-id 20050613140940.GB1906@penne.toroid.org
Whole thread Raw
In response to creating WITH HOLD cursors using SPI  (Abhijit Menon-Sen <ams@oryx.com>)
Responses Re: creating WITH HOLD cursors using SPI
Re: creating WITH HOLD cursors using SPI
List pgsql-hackers
At 2005-06-12 14:54:47 +0530, ams@oryx.com wrote:
>
> The idea is to have spi_query call SPI_prepare/SPI_open_cursor, and have
> an spi_fetchrow that calls SPI_cursor_fetch. It works well enough, but I
> don't know how to reproduce spi_exec_query's error handling (it runs the
> SPI_execute in a subtransaction).

One possibility would be to make plperl_call_handler create the internal
subtransaction, so that all of the perl code runs inside it. But I'm not
sure if that would actually work, especially if one of the SPI functions
failed. But I can't think of what else to do, either.

Thoughts?

-- ams


pgsql-hackers by date:

Previous
From: Tino Wildenhain
Date:
Subject: Re: The Contrib Roundup (long)
Next
From: David Fetter
Date:
Subject: Re: creating WITH HOLD cursors using SPI