]> begriffs open source - ai-pg/blob - full-docs/man3/SPI_register_relation.3
Convert HTML docs to more streamlined TXT
[ai-pg] / full-docs / man3 / SPI_register_relation.3
1 '\" t
2 .\"     Title: SPI_register_relation
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_REGISTER_RELATION" "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_register_relation \- make an ephemeral named relation available by name in SPI queries
32 .SH "SYNOPSIS"
33 .sp
34 .nf
35 int SPI_register_relation(EphemeralNamedRelation \fIenr\fR)
36 .fi
37 .SH "DESCRIPTION"
38 .PP
39 \fBSPI_register_relation\fR
40 makes an ephemeral named relation, with associated information, available to queries planned and executed through the current SPI connection\&.
41 .SH "ARGUMENTS"
42 .PP
43 EphemeralNamedRelation \fIenr\fR
44 .RS 4
45 the ephemeral named relation registry entry
46 .RE
47 .SH "RETURN VALUE"
48 .PP
49 If the execution of the command was successful then the following (nonnegative) value will be returned:
50 .PP
51 SPI_OK_REL_REGISTER
52 .RS 4
53 if the relation has been successfully registered by name
54 .RE
55 .PP
56 On error, one of the following negative values is returned:
57 .PP
58 SPI_ERROR_ARGUMENT
59 .RS 4
60 if
61 \fIenr\fR
62 is
63 NULL
64 or its
65 \fIname\fR
66 field is
67 NULL
68 .RE
69 .PP
70 SPI_ERROR_UNCONNECTED
71 .RS 4
72 if called from an unconnected C function
73 .RE
74 .PP
75 SPI_ERROR_REL_DUPLICATE
76 .RS 4
77 if the name specified in the
78 \fIname\fR
79 field of
80 \fIenr\fR
81 is already registered for this connection
82 .RE