gooderp18绿色标准版
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 line
4.0KB

  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>37.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 V1.79.1" /><link rel="prev" href="xfunc-pl.html" title="37.8. Procedural Language Functions" /><link rel="next" href="xfunc-c.html" title="37.10. C-Language Functions" /></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">37.9. Internal Functions</th></tr><tr><td width="10%" align="left"><a accesskey="p" href="xfunc-pl.html" title="37.8. Procedural Language Functions">Prev</a> </td><td width="10%" align="left"><a accesskey="u" href="extend.html" title="Chapter 37. Extending SQL">Up</a></td><th width="60%" align="center">Chapter 37. Extending <acronym xmlns="http://www.w3.org/1999/xhtml" class="acronym">SQL</acronym></th><td width="10%" align="right"><a accesskey="h" href="index.html" title="PostgreSQL 12.4 Documentation">Home</a></td><td width="10%" align="right"> <a accesskey="n" href="xfunc-c.html" title="37.10. C-Language Functions">Next</a></td></tr></table><hr></hr></div><div class="sect1" id="XFUNC-INTERNAL"><div class="titlepage"><div><div><h2 class="title" style="clear: both">37.9. Internal Functions</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">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="extend.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="xfunc-c.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">37.8. Procedural Language Functions </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> 37.10. C-Language Functions</td></tr></table></div></body></html>
上海开阖软件有限公司 沪ICP备12045867号-1