2 .\" Title: SPI_register_relation
3 .\" Author: The PostgreSQL Global Development Group
4 .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
6 .\" Manual: PostgreSQL 18.0 Documentation
7 .\" Source: PostgreSQL 18.0
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 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
25 .\" disable justification (adjust text to left margin only)
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
31 SPI_register_relation \- make an ephemeral named relation available by name in SPI queries
35 int SPI_register_relation(EphemeralNamedRelation \fIenr\fR)
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\&.
43 EphemeralNamedRelation \fIenr\fR
45 the ephemeral named relation registry entry
49 If the execution of the command was successful then the following (nonnegative) value will be returned:
53 if the relation has been successfully registered by name
56 On error, one of the following negative values is returned:
72 if called from an unconnected C function
75 SPI_ERROR_REL_DUPLICATE
77 if the name specified in the
81 is already registered for this connection