Sophie

Sophie

distrib > Mageia > 7 > x86_64 > by-pkgid > 9b6cc37ce608401d44f6535a0c7cb777 > files > 763

postgresql11-docs-11.5-1.mga7.noarch.rpm

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>SPI_register_relation</title><link rel="stylesheet" type="text/css" href="stylesheet.css" /><link rev="made" href="pgsql-docs@lists.postgresql.org" /><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot" /><link rel="prev" href="spi-spi-saveplan.html" title="SPI_saveplan" /><link rel="next" href="spi-spi-unregister-relation.html" title="SPI_unregister_relation" /></head><body><div xmlns="http://www.w3.org/TR/xhtml1/transitional" class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="5" align="center">SPI_register_relation</th></tr><tr><td width="10%" align="left"><a accesskey="p" href="spi-spi-saveplan.html" title="SPI_saveplan">Prev</a> </td><td width="10%" align="left"><a accesskey="u" href="spi-interface.html" title="47.1. Interface Functions">Up</a></td><th width="60%" align="center">47.1. Interface Functions</th><td width="10%" align="right"><a accesskey="h" href="index.html" title="PostgreSQL 11.5 Documentation">Home</a></td><td width="10%" align="right"> <a accesskey="n" href="spi-spi-unregister-relation.html" title="SPI_unregister_relation">Next</a></td></tr></table><hr></hr></div><div class="refentry" id="SPI-SPI-REGISTER-RELATION"><div class="titlepage"></div><a id="id-1.8.12.8.27.1" class="indexterm"></a><a id="id-1.8.12.8.27.2" class="indexterm"></a><div class="refnamediv"><h2><span class="refentrytitle">SPI_register_relation</span></h2><p>SPI_register_relation — make an ephemeral named relation available by name in SPI queries</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="synopsis">
int SPI_register_relation(EphemeralNamedRelation <em class="parameter"><code>enr</code></em>)
</pre></div><div class="refsect1" id="id-1.8.12.8.27.6"><h2>Description</h2><p>
   <code class="function">SPI_register_relation</code> makes an ephemeral named
   relation, with associated information, available to queries planned and
   executed through the current SPI connection.
  </p></div><div class="refsect1" id="id-1.8.12.8.27.7"><h2>Arguments</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="literal">EphemeralNamedRelation <em class="parameter"><code>enr</code></em></code></span></dt><dd><p>
      the ephemeral named relation registry entry
     </p></dd></dl></div></div><div class="refsect1" id="id-1.8.12.8.27.8"><h2>Return Value</h2><p>
   If the execution of the command was successful then the following
   (nonnegative) value will be returned:

   </p><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="symbol">SPI_OK_REL_REGISTER</code></span></dt><dd><p>
       if the relation has been successfully registered by name
      </p></dd></dl></div><p>
  </p><p>
   On error, one of the following negative values is returned:

   </p><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="symbol">SPI_ERROR_ARGUMENT</code></span></dt><dd><p>
       if <em class="parameter"><code>enr</code></em> is <code class="symbol">NULL</code> or its
       <code class="varname">name</code> field is <code class="symbol">NULL</code>
      </p></dd><dt><span class="term"><code class="symbol">SPI_ERROR_UNCONNECTED</code></span></dt><dd><p>
       if called from an unconnected C function
      </p></dd><dt><span class="term"><code class="symbol">SPI_ERROR_REL_DUPLICATE</code></span></dt><dd><p>
       if the name specified in the <code class="varname">name</code> field of
       <em class="parameter"><code>enr</code></em> is already registered for this connection
      </p></dd></dl></div><p>
  </p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="spi-spi-saveplan.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="spi-interface.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="spi-spi-unregister-relation.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">SPI_saveplan </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> SPI_unregister_relation</td></tr></table></div></body></html>