David Fetter <david(at)fetter(dot)org> writes:
>> I've found a little lacuna in the RETURNING feature, that being in
>> PL/Perl's spi_prepare()/spi_execute_prepared() as illustrated in the
>> attached file on CVS TIP.
It looks like plperl_spi_execute_fetch_result only expects to find
tuples returned if the status is SPI_OK_SELECT. pltcl and plpython
have likely got similar issues.
This reminds me of a consideration I had been intending to bring up on
the mailing lists: what exactly do we want to do with the SPI API for
RETURNING queries? The current behavior is that it still returns
SPI_OK_INSERT and so on, but also creates a SPI_tuptable. Is this
what we want? Perhaps we should invent additional return codes
Another issue I noted in that same area is that spi.c does not set
SPI_processed for a utility statement, even if the utility statement
returns tuples. Is this a bug, or should we leave it alone?
regards, tom lane
In response to
pgsql-hackers by date
|Next:||From: Bernd Helmle||Date: 2006-08-24 19:08:32|
|Subject: Re: [HACKERS] Updatable views|
|Previous:||From: Zoltan Boszormenyi||Date: 2006-08-24 18:58:18|
|Subject: Re: [HACKERS] COPY view|