1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
8 CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
10 HREF="mailto:pgsql-docs@postgresql.org"><LINK
12 TITLE="PostgreSQL 7.4.1 Documentation"
13 HREF="index.html"><LINK
15 TITLE="Interface Functions"
16 HREF="spi.html#SPI-INTERFACE"><LINK
18 TITLE="SPI_cursor_close"
19 HREF="spi-spi-cursor-close.html"><LINK
21 TITLE="Interface Support Functions"
22 HREF="spi-interface-support.html"><LINK
25 HREF="stylesheet.css"><META
27 CONTENT="2003-12-22T03:48:47"></HEAD
33 SUMMARY="Header navigation table"
43 >PostgreSQL 7.4.1 Documentation</TH
51 HREF="spi-spi-cursor-close.html"
60 HREF="spi-spi-cursor-close.html"
81 HREF="spi-interface-support.html"
92 NAME="SPI-SPI-SAVEPLAN"
102 >SPI_saveplan -- save a plan</DIV
107 CLASS="REFSYNOPSISDIV"
115 >void * SPI_saveplan(void * <VAR
131 > saves a passed plan (prepared by
135 >) in memory protected from freeing
139 > and by the transaction manager
140 and returns a pointer to the saved plan. This gives you the
141 ability to reuse prepared plans in the subsequent invocations of
142 your procedure in the current session. You may save the pointer
143 returned in a local variable. Always check if this pointer is
147 > or not either when preparing a plan or using
148 an already prepared plan in <CODE
176 > the plan to be saved
190 > Pointer to the saved plan; <TT
207 >SPI_ERROR_ARGUMENT</TT
223 >SPI_ERROR_UNCONNECTED</TT
227 > if called from an unconnected procedure
243 > If one of the objects (a table, function, etc.) referenced by the
244 prepared plan is dropped during the session then the results of
248 > for this plan will be unpredictable.
256 SUMMARY="Footer navigation table"
267 HREF="spi-spi-cursor-close.html"
285 HREF="spi-interface-support.html"
295 >SPI_cursor_close</TD
301 HREF="spi.html#SPI-INTERFACE"
309 >Interface Support Functions</TD