From 95f6d2d20921b7c2dbec29bf2706fd9448208aa6 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Thu, 15 Mar 2007 23:12:07 +0000 Subject: Make use of plancache module for SPI plans. In particular, since plpgsql uses SPI plans, this finally fixes the ancient gotcha that you can't drop and recreate a temp table used by a plpgsql function. Along the way, clean up SPI's API a little bit by declaring SPI plan pointers as "SPIPlanPtr" instead of "void *". This is cosmetic but helps to forestall simple programming mistakes. (I have changed some but not all of the callers to match; there are still some "void *"'s in contrib and the PL's. This is intentional so that we can see if anyone's compiler complains about it.) --- src/backend/utils/adt/xml.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/backend/utils/adt/xml.c') diff --git a/src/backend/utils/adt/xml.c b/src/backend/utils/adt/xml.c index 921fe1d9f50..fa82837fd0c 100644 --- a/src/backend/utils/adt/xml.c +++ b/src/backend/utils/adt/xml.c @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/backend/utils/adt/xml.c,v 1.34 2007/03/03 19:32:55 neilc Exp $ + * $PostgreSQL: pgsql/src/backend/utils/adt/xml.c,v 1.35 2007/03/15 23:12:06 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -1800,7 +1800,7 @@ query_to_xmlschema(PG_FUNCTION_ARGS) const char *targetns = _textout(PG_GETARG_TEXT_P(3)); const char *result; - void *plan; + SPIPlanPtr plan; Portal portal; SPI_connect(); @@ -1871,7 +1871,7 @@ query_to_xml_and_xmlschema(PG_FUNCTION_ARGS) const char *targetns = _textout(PG_GETARG_TEXT_P(3)); const char *xmlschema; - void *plan; + SPIPlanPtr plan; Portal portal; SPI_connect(); -- cgit v1.2.3