Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

SPI support needed for EXECUTE USING



The proposed EXECUTE USING patch represents a serious performance loss
compared to the traditional method of interpolating parameter values
into the query text, anytime the value of the parameter is important
for planning purposes.  We have fixed that in the Protocol BIND message
context by providing a way to push parameter values into the planning
process, but there is no way for plpgsql to do the same, because it
uses the SPI interface and SPI doesn't expose any way to do it.

I propose adding an additional SPI function along the lines of

	int SPI_execute_with_args(const char *src,
				  int nargs, Oid *argtypes,
				  Datum *Values, const char *Nulls,
				  bool read_only, long tcount);

to encapsulate the process of creating a one-shot plan and executing
it with specific parameter values.

Comments?

			regards, tom lane



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group