3
.\" Author: The PostgreSQL Global Development Group
4
.\" Generator: DocBook XSL Stylesheets v1.75.1 <http://docbook.sf.net/>
6
.\" Manual: PostgreSQL 9.1beta1 Documentation
7
.\" Source: PostgreSQL 9.1beta1
10
.TH "SPI_CONNECT" "3" "2011-04-27" "PostgreSQL 9.1beta1" "PostgreSQL 9.1beta1 Documentation"
11
.\" -----------------------------------------------------------------
12
.\" * set default formatting
13
.\" -----------------------------------------------------------------
14
.\" disable hyphenation
16
.\" disable justification (adjust text to left margin only)
18
.\" -----------------------------------------------------------------
19
.\" * MAIN CONTENT STARTS HERE *
20
.\" -----------------------------------------------------------------
22
SPI_connect \- connect a procedure to the SPI manager
32
opens a connection from a procedure invocation to the SPI manager\&. You must call this function if you want to execute commands through SPI\&. Some utility SPI functions can be called from unconnected procedures\&.
34
If your procedure is already connected,
36
will return the error code
37
SPI_ERROR_CONNECT\&. This could happen if a procedure that has called
39
directly calls another procedure that calls
40
\fBSPI_connect\fR\&. While recursive calls to the
42
manager are permitted when an SQL command called through SPI invokes another function that uses
43
SPI, directly nested calls to
47
are forbidden\&. (But see