Re: Additional SPI functions - Mailing list pgsql-hackers

From James William Pye
Subject Re: Additional SPI functions
Date
Msg-id 864CA37B-4307-4FD4-B151-4ED56813E272@jwp.name
Whole thread Raw
In response to Re: Additional SPI functions  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Dec 20, 2009, at 12:03 AM, Tom Lane wrote:
> This looks like it's most likely redundant with the stuff I added
> recently for the plpgsql parser rewrite.  Please see if you can use that
> instead.

The parser param hooks will definitely work. As for getting the result TupleDesc prior to execution, I can include
spi_priv.hand look at the CPS list directly. Something more crayola would be preferable, but I don't think
"SPI_prepare_statement"is that something; although, it did make for a fine stopgap. (Well, "fine", saving that my
proposedSPI_prepare_statement appeared to be broken wrt plan revalidation and bound parameters.. ew) 

So, after looking into the parser hooks, CachedPlanSource, and SPI more, I ended up taking a slightly different route.
Iexpect it to work with a couple prior versions of PG as well, so there is some added value over a new SPI function or
exclusivelyusing param hooks. And, now, thinking of compatibility with past versions of PG, I'll find a different route
for"SPI_execute_statements" as well. 


Thanks.

pgsql-hackers by date:

Previous
From: Takahiro Itagaki
Date:
Subject: Verifying variable names in pgbench
Next
From: Robert Haas
Date:
Subject: Re: Removing pg_migrator limitations