]> begriffs open source - ai-pg/blob - full-docs/html/xfunc-internal.html
Include links to all subsection html pages, with shorter paths too
[ai-pg] / full-docs / html / xfunc-internal.html
1 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2 <!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>36.9. Internal Functions</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="xfunc-pl.html" title="36.8. Procedural Language Functions" /><link rel="next" href="xfunc-c.html" title="36.10. C-Language Functions" /></head><body id="docContent" class="container-fluid col-10"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="5" align="center">36.9. Internal Functions</th></tr><tr><td width="10%" align="left"><a accesskey="p" href="xfunc-pl.html" title="36.8. Procedural Language Functions">Prev</a> </td><td width="10%" align="left"><a accesskey="u" href="extend.html" title="Chapter 36. Extending SQL">Up</a></td><th width="60%" align="center">Chapter 36. Extending <acronym class="acronym">SQL</acronym></th><td width="10%" align="right"><a accesskey="h" href="index.html" title="PostgreSQL 18.0 Documentation">Home</a></td><td width="10%" align="right"> <a accesskey="n" href="xfunc-c.html" title="36.10. C-Language Functions">Next</a></td></tr></table><hr /></div><div class="sect1" id="XFUNC-INTERNAL"><div class="titlepage"><div><div><h2 class="title" style="clear: both">36.9. Internal Functions <a href="#XFUNC-INTERNAL" class="id_link">#</a></h2></div></div></div><a id="id-1.8.3.12.2" class="indexterm"></a><p>
3     Internal functions are functions written in C that have been statically
4     linked into the <span class="productname">PostgreSQL</span> server.
5     The <span class="quote">“<span class="quote">body</span>”</span> of the function definition
6     specifies the C-language name of the function, which need not be the
7     same as the name being declared for SQL use.
8     (For reasons of backward compatibility, an empty body
9     is accepted as meaning that the C-language function name is the
10     same as the SQL name.)
11    </p><p>
12     Normally, all internal functions present in the
13     server are declared during the initialization of the database cluster
14     (see <a class="xref" href="creating-cluster.html" title="18.2. Creating a Database Cluster">Section 18.2</a>),
15     but a user could use <code class="command">CREATE FUNCTION</code>
16     to create additional alias names for an internal function.
17     Internal functions are declared in <code class="command">CREATE FUNCTION</code>
18     with language name <code class="literal">internal</code>.  For instance, to
19     create an alias for the <code class="function">sqrt</code> function:
20 </p><pre class="programlisting">
21 CREATE FUNCTION square_root(double precision) RETURNS double precision
22     AS 'dsqrt'
23     LANGUAGE internal
24     STRICT;
25 </pre><p>
26     (Most internal functions expect to be declared <span class="quote">“<span class="quote">strict</span>”</span>.)
27    </p><div class="note"><h3 class="title">Note</h3><p>
28      Not all <span class="quote">“<span class="quote">predefined</span>”</span> functions are
29      <span class="quote">“<span class="quote">internal</span>”</span> in the above sense.  Some predefined
30      functions are written in SQL.
31     </p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="xfunc-pl.html" title="36.8. Procedural Language Functions">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="extend.html" title="Chapter 36. Extending SQL">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="xfunc-c.html" title="36.10. C-Language Functions">Next</a></td></tr><tr><td width="40%" align="left" valign="top">36.8. Procedural Language Functions </td><td width="20%" align="center"><a accesskey="h" href="index.html" title="PostgreSQL 18.0 Documentation">Home</a></td><td width="40%" align="right" valign="top"> 36.10. C-Language Functions</td></tr></table></div></body></html>