]> begriffs open source - ai-pg/blob - full-docs/man3/SPI_finish.3
Convert HTML docs to more streamlined TXT
[ai-pg] / full-docs / man3 / SPI_finish.3
1 '\" t
2 .\"     Title: SPI_finish
3 .\"    Author: The PostgreSQL Global Development Group
4 .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
5 .\"      Date: 2025
6 .\"    Manual: PostgreSQL 18.0 Documentation
7 .\"    Source: PostgreSQL 18.0
8 .\"  Language: English
9 .\"
10 .TH "SPI_FINISH" "3" "2025" "PostgreSQL 18.0" "PostgreSQL 18.0 Documentation"
11 .\" -----------------------------------------------------------------
12 .\" * Define some portability stuff
13 .\" -----------------------------------------------------------------
14 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 .\" http://bugs.debian.org/507673
16 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18 .ie \n(.g .ds Aq \(aq
19 .el       .ds Aq '
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
24 .nh
25 .\" disable justification (adjust text to left margin only)
26 .ad l
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
30 .SH "NAME"
31 SPI_finish \- disconnect a C function from the SPI manager
32 .SH "SYNOPSIS"
33 .sp
34 .nf
35 int SPI_finish(void)
36 .fi
37 .SH "DESCRIPTION"
38 .PP
39 \fBSPI_finish\fR
40 closes an existing connection to the SPI manager\&. You must call this function after completing the SPI operations needed during your C function\*(Aqs current invocation\&. You do not need to worry about making this happen, however, if you abort the transaction via
41 elog(ERROR)\&. In that case SPI will clean itself up automatically\&.
42 .SH "RETURN VALUE"
43 .PP
44 SPI_OK_FINISH
45 .RS 4
46 if properly disconnected
47 .RE
48 .PP
49 SPI_ERROR_UNCONNECTED
50 .RS 4
51 if called from an unconnected C function
52 .RE