~ubuntu-branches/ubuntu/oneiric/postgresql-9.1/oneiric-security

« back to all changes in this revision

Viewing changes to doc/src/sgml/man3/SPI_connect.3

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2011-05-11 10:41:53 UTC
  • Revision ID: james.westby@ubuntu.com-20110511104153-psbh2o58553fv1m0
Tags: upstream-9.1~beta1
ImportĀ upstreamĀ versionĀ 9.1~beta1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
'\" t
 
2
.\"     Title: SPI_connect
 
3
.\"    Author: The PostgreSQL Global Development Group
 
4
.\" Generator: DocBook XSL Stylesheets v1.75.1 <http://docbook.sf.net/>
 
5
.\"      Date: 2011-04-27
 
6
.\"    Manual: PostgreSQL 9.1beta1 Documentation
 
7
.\"    Source: PostgreSQL 9.1beta1
 
8
.\"  Language: English
 
9
.\"
 
10
.TH "SPI_CONNECT" "3" "2011-04-27" "PostgreSQL 9.1beta1" "PostgreSQL 9.1beta1 Documentation"
 
11
.\" -----------------------------------------------------------------
 
12
.\" * set default formatting
 
13
.\" -----------------------------------------------------------------
 
14
.\" disable hyphenation
 
15
.nh
 
16
.\" disable justification (adjust text to left margin only)
 
17
.ad l
 
18
.\" -----------------------------------------------------------------
 
19
.\" * MAIN CONTENT STARTS HERE *
 
20
.\" -----------------------------------------------------------------
 
21
.SH "NAME"
 
22
SPI_connect \- connect a procedure to the SPI manager
 
23
.\" SPI_connect
 
24
.SH "SYNOPSIS"
 
25
.sp
 
26
.nf
 
27
int SPI_connect(void)
 
28
.fi
 
29
.SH "DESCRIPTION"
 
30
.PP
 
31
\fBSPI_connect\fR
 
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\&.
 
33
.PP
 
34
If your procedure is already connected,
 
35
\fBSPI_connect\fR
 
36
will return the error code
 
37
SPI_ERROR_CONNECT\&. This could happen if a procedure that has called
 
38
\fBSPI_connect\fR
 
39
directly calls another procedure that calls
 
40
\fBSPI_connect\fR\&. While recursive calls to the
 
41
SPI
 
42
manager are permitted when an SQL command called through SPI invokes another function that uses
 
43
SPI, directly nested calls to
 
44
\fBSPI_connect\fR
 
45
and
 
46
\fBSPI_finish\fR
 
47
are forbidden\&. (But see
 
48
\fBSPI_push\fR
 
49
and
 
50
\fBSPI_pop\fR\&.)
 
51
.SH "RETURN VALUE"
 
52
.PP
 
53
SPI_OK_CONNECT
 
54
.RS 4
 
55
on success
 
56
.RE
 
57
.PP
 
58
SPI_ERROR_CONNECT
 
59
.RS 4
 
60
on error
 
61
.RE