Datasets:
Download web/postgresql.org/reference/site/docs/current/xplang.html from Qwen/RecreationBench: direct link, hf CLI and curl.
- Browser
- Download file 15.1 kB
-
https://huggingface.co/datasets/Qwen/RecreationBench/resolve/main/web/postgresql.org/reference/site/docs/current/xplang.html
- Command line
-
hf download hf://datasets/Qwen/RecreationBench/web/postgresql.org/reference/site/docs/current/xplang.html
-
curl -L -o xplang.html https://huggingface.co/datasets/Qwen/RecreationBench/resolve/main/web/postgresql.org/reference/site/docs/current/xplang.html
15.1 kB
| <html data-theme="light" lang="en"><head> | |
| <title>PostgreSQL: Documentation: 18: Chapter 40. Procedural Languages</title> | |
| <meta content="width=device-width, initial-scale=1, shrink-to-fit=no" name="viewport"/> | |
| <meta content="text/xhtml; charset=utf-8" http-equiv="Content-Type"/> | |
| <meta content="#336791" name="theme-color"/> | |
| <meta content="The PostgreSQL Global Development Group" name="copyright"/> | |
| <meta content="/docs/18/xplang.html" property="og:url"/> | |
| <meta content="article" property="og:type"/> | |
| <meta content="2026-02-26T14:07:09" property="article:published_time"/> | |
| <meta content="/media/img/about/press/elephant.png" property="og:image"/> | |
| <meta content="Chapter 40. Procedural Languages" property="og:title"/> | |
| <meta content="Chapter&nbsp;40.&nbsp;Procedural Languages Table of Contents 40.1. Installing Procedural Languages PostgreSQL allows user-defined functions to be written in other languages besides …" property="og:description"/> | |
| <meta content="PostgreSQL Documentation" property="og:site_name"/> | |
| <link href="/media/css/fontawesome.css?54a05eb2" rel="stylesheet"/> | |
| <link href="/media/css/bootstrap-4.4.1.min.css" rel="stylesheet"/> | |
| <link href="/favicon.ico" rel="shortcut icon"/> | |
| <link href="/dyncss/base.css?54a05eb2" rel="stylesheet" type="text/css"/> | |
| <script src="/media/js/theme.js?54a05eb2"></script> | |
| <link href="/docs/current/xplang.html" rel="canonical"/> | |
| </head> | |
| <body> | |
| <div class="container-fluid"> | |
| <div class="row justify-content-md-center"> | |
| <div class="col"> | |
| <!-- Header --> | |
| <nav class="navbar navbar-expand-lg navbar-light bg-light"> | |
| <a class="navbar-brand p-0" href="/"> | |
| <img alt="PostgreSQL Elephant Logo" class="logo" src="/media/img/about/press/elephant.png"/> | |
| </a> | |
| <input aria-controls="pgNavbar" aria-expanded="false" aria-label="Toggle navigation" id="navbar-toggler" type="checkbox"/> | |
| <label class="navbar-toggler" for="navbar-toggler" id="navbar-toggler-label" tabindex="0"><span class="navbar-toggler-icon"></span></label> | |
| <div class="navbar-collapse" id="pgNavbar"> | |
| <ul class="navbar-nav mr-auto"> | |
| <li class="nav-item p-2"><a href="/" title="Home">Home</a></li> | |
| <li class="nav-item p-2"><a href="/about/" title="About">About</a></li> | |
| <li class="nav-item p-2"><a href="/download/" title="Download">Download</a></li> | |
| <li class="nav-item p-2"><a href="/docs/" title="Documentation">Documentation</a></li> | |
| <li class="nav-item p-2"><a href="/community/" title="Community">Community</a></li> | |
| <li class="nav-item p-2"><a href="/developer/" title="Developers">Developers</a></li> | |
| <li class="nav-item p-2"><a href="/support/" title="Support">Support</a></li> | |
| <li class="nav-item p-2"><a href="/about/donate/" title="Donate">Donate</a></li> | |
| <li class="nav-item p-2"><a href="/account/" title="Your account">Your account</a></li> | |
| </ul> | |
| <form action="/search/" method="get" role="search"> | |
| <div class="input-group"> | |
| <input accesskey="s" class="form-control" id="q" maxlength="255" name="q" placeholder="Search for..." size="20" type="text"/> | |
| <span class="input-group-btn"> | |
| <button class="btn btn-default" type="submit"><i class="fas fa-search"></i></button> | |
| </span> | |
| </div><!-- /input-group --> | |
| </form> | |
| <form class="form-inline" id="form-theme"> | |
| <button class="btn btn-default ml-1" id="btn-theme" type="button"><i class="fas fa-moon"></i></button> | |
| </form> | |
| </div> | |
| </nav> | |
| </div> | |
| </div> | |
| <div class="row justify-content-center pg-shout-box"> | |
| <div class="col text-white text-center">February 26, 2026: <a href="/about/news/postgresql-183-179-1613-1517-and-1422-released-3246/"> | |
| PostgreSQL 18.3, 17.9, 16.13, 15.17, and 14.22 Released! | |
| </a> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="container-fluid margin"> | |
| <div class="row"> | |
| <div class="col-11" id="pgContentWrap"> | |
| <div class="row"> | |
| <div class="col-md-6 mb-2"> | |
| <div class="row"> | |
| <div class="col"> | |
| <div> | |
| <a href="/docs/" title="Documentation">Documentation</a> → <a href="/docs/18/index.html">PostgreSQL 18</a> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="row"> | |
| <div class="col"> | |
| Supported Versions: | |
| <a class="docs-version-selected" href="/docs/current/xplang.html" title="PostgreSQL 18 - Chapter 40. Procedural Languages">Current</a> | |
| (<a class="docs-version-selected" href="/docs/18/xplang.html" title="PostgreSQL 18 - Chapter 40. Procedural Languages">18</a>) | |
| / | |
| <a href="/docs/17/xplang.html" title="PostgreSQL 17 - Chapter 40. Procedural Languages">17</a> | |
| / | |
| <a href="/docs/16/xplang.html" title="PostgreSQL 16 - Chapter 40. Procedural Languages">16</a> | |
| / | |
| <a href="/docs/15/xplang.html" title="PostgreSQL 15 - Chapter 40. Procedural Languages">15</a> | |
| / | |
| <a href="/docs/14/xplang.html" title="PostgreSQL 14 - Chapter 40. Procedural Languages">14</a> | |
| </div> | |
| </div> | |
| <div class="row"> | |
| <div class="col"> | |
| Development Versions: | |
| <a href="/docs/devel/xplang.html" rel="nofollow" title="PostgreSQL devel - Chapter 40. Procedural Languages">devel</a> | |
| </div> | |
| </div> | |
| <div class="row"> | |
| <div class="col-12"> | |
| Unsupported versions: | |
| <a href="/docs/13/xplang.html" rel="nofollow" title="PostgreSQL 13 - Chapter 40. Procedural Languages">13</a> | |
| / | |
| <a href="/docs/12/xplang.html" rel="nofollow" title="PostgreSQL 12 - Chapter 40. Procedural Languages">12</a> | |
| / | |
| <a href="/docs/11/xplang.html" rel="nofollow" title="PostgreSQL 11 - Chapter 40. Procedural Languages">11</a> | |
| / | |
| <a href="/docs/10/xplang.html" rel="nofollow" title="PostgreSQL 10 - Chapter 40. Procedural Languages">10</a> | |
| / | |
| <a href="/docs/9.6/xplang.html" rel="nofollow" title="PostgreSQL 9.6 - Chapter 40. Procedural Languages">9.6</a> | |
| / | |
| <a href="/docs/9.5/xplang.html" rel="nofollow" title="PostgreSQL 9.5 - Chapter 40. Procedural Languages">9.5</a> | |
| / | |
| <a href="/docs/9.4/xplang.html" rel="nofollow" title="PostgreSQL 9.4 - Chapter 40. Procedural Languages">9.4</a> | |
| / | |
| <a href="/docs/9.3/xplang.html" rel="nofollow" title="PostgreSQL 9.3 - Chapter 40. Procedural Languages">9.3</a> | |
| / | |
| <a href="/docs/9.2/xplang.html" rel="nofollow" title="PostgreSQL 9.2 - Chapter 40. Procedural Languages">9.2</a> | |
| / | |
| <a href="/docs/9.1/xplang.html" rel="nofollow" title="PostgreSQL 9.1 - Chapter 40. Procedural Languages">9.1</a> | |
| / | |
| <a href="/docs/9.0/xplang.html" rel="nofollow" title="PostgreSQL 9.0 - Chapter 40. Procedural Languages">9.0</a> | |
| / | |
| <a href="/docs/8.4/xplang.html" rel="nofollow" title="PostgreSQL 8.4 - Chapter 40. Procedural Languages">8.4</a> | |
| / | |
| <a href="/docs/8.3/xplang.html" rel="nofollow" title="PostgreSQL 8.3 - Chapter 40. Procedural Languages">8.3</a> | |
| / | |
| <a href="/docs/8.2/xplang.html" rel="nofollow" title="PostgreSQL 8.2 - Chapter 40. Procedural Languages">8.2</a> | |
| / | |
| <a href="/docs/8.1/xplang.html" rel="nofollow" title="PostgreSQL 8.1 - Chapter 40. Procedural Languages">8.1</a> | |
| / | |
| <a href="/docs/8.0/xplang.html" rel="nofollow" title="PostgreSQL 8.0 - Chapter 40. Procedural Languages">8.0</a> | |
| / | |
| <a href="/docs/7.4/xplang.html" rel="nofollow" title="PostgreSQL 7.4 - Chapter 40. Procedural Languages">7.4</a> | |
| / | |
| <a href="/docs/7.3/xplang.html" rel="nofollow" title="PostgreSQL 7.3 - Chapter 40. Procedural Languages">7.3</a> | |
| / | |
| <a href="/docs/7.2/xplang.html" rel="nofollow" title="PostgreSQL 7.2 - Chapter 40. Procedural Languages">7.2</a> | |
| / | |
| <a href="/docs/7.1/xplang.html" rel="nofollow" title="PostgreSQL 7.1 - Chapter 40. Procedural Languages">7.1</a> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="col-md-6 col-lg-5 offset-lg-1"> | |
| <form action="/search/" id="docSearchForm" method="get" role="search"> | |
| <input name="u" type="hidden" value="/docs/18/"/> | |
| <div class="input-group"> | |
| <input class="form-control" id="q" name="q" placeholder="Search the documentation for..." type="text"/> | |
| <span class="input-group-btn"> | |
| <button class="btn btn-default" type="submit"><i class="fas fa-search"></i></button> | |
| </span> | |
| </div><!-- /input-group --> | |
| </form> | |
| </div> | |
| </div> | |
| <div id="docContent"> | |
| <div class="navheader"> | |
| <table summary="Navigation header" width="100%"> | |
| <tbody><tr> | |
| <th align="center" colspan="5">Chapter 40. Procedural Languages</th> | |
| </tr> | |
| <tr> | |
| <td align="left" width="10%"><a accesskey="p" href="/docs/current/rules-triggers.html" title="39.7. Rules Versus Triggers">Prev</a> </td> | |
| <td align="left" width="10%"><a accesskey="u" href="/docs/current/server-programming.html" title="Part V. Server Programming">Up</a></td> | |
| <th align="center" width="60%">Part V. Server Programming</th> | |
| <td align="right" width="10%"><a accesskey="h" href="/docs/current/index.html" title="PostgreSQL 18.3 Documentation">Home</a></td> | |
| <td align="right" width="10%"> <a accesskey="n" href="/docs/current/xplang-install.html" title="40.1. Installing Procedural Languages">Next</a></td> | |
| </tr> | |
| </tbody></table> | |
| <hr/> | |
| </div> | |
| <div class="chapter" id="XPLANG"> | |
| <div class="titlepage"> | |
| <div> | |
| <div> | |
| <h2 class="title">Chapter 40. Procedural Languages</h2> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="toc"> | |
| <p><strong>Table of Contents</strong></p> | |
| <dl class="toc"> | |
| <dt><span class="sect1"><a href="/docs/current/xplang-install.html">40.1. Installing Procedural Languages</a></span></dt> | |
| </dl> | |
| </div><a class="indexterm" id="id-1.8.7.2" name="id-1.8.7.2"></a> | |
| <p><span class="productname">PostgreSQL</span> allows user-defined functions to be written in other languages besides SQL and C. These other languages are generically called <em class="firstterm">procedural languages</em> (<acronym class="acronym">PL</acronym>s). For a function written in a procedural language, the database server has no built-in knowledge about how to interpret the function's source text. Instead, the task is passed to a special handler that knows the details of the language. The handler could either do all the work of parsing, syntax analysis, execution, etc. itself, or it could serve as <span class="quote">“<span class="quote">glue</span>”</span> between <span class="productname">PostgreSQL</span> and an existing implementation of a programming language. The handler itself is a C language function compiled into a shared object and loaded on demand, just like any other C function.</p> | |
| <p>There are currently four procedural languages available in the standard <span class="productname">PostgreSQL</span> distribution: <span class="application">PL/pgSQL</span> (<a class="xref" href="/docs/current/plpgsql.html" title="Chapter 41. PL/pgSQL — SQL Procedural Language">Chapter 41</a>), <span class="application">PL/Tcl</span> (<a class="xref" href="/docs/current/pltcl.html" title="Chapter 42. PL/Tcl — Tcl Procedural Language">Chapter 42</a>), <span class="application">PL/Perl</span> (<a class="xref" href="/docs/current/plperl.html" title="Chapter 43. PL/Perl — Perl Procedural Language">Chapter 43</a>), and <span class="application">PL/Python</span> (<a class="xref" href="/docs/current/plpython.html" title="Chapter 44. PL/Python — Python Procedural Language">Chapter 44</a>). There are additional procedural languages available that are not included in the core distribution. <a class="xref" href="/docs/current/external-projects.html" title="Appendix H. External Projects">Appendix H</a> has information about finding them. In addition other languages can be defined by users; the basics of developing a new procedural language are covered in <a class="xref" href="/docs/current/plhandler.html" title="Chapter 57. Writing a Procedural Language Handler">Chapter 57</a>.</p> | |
| </div> | |
| <div class="navfooter"> | |
| <hr/> | |
| <table summary="Navigation footer" width="100%"> | |
| <tbody><tr> | |
| <td align="left" width="40%"><a accesskey="p" href="/docs/current/rules-triggers.html" title="39.7. Rules Versus Triggers">Prev</a> </td> | |
| <td align="center" width="20%"><a accesskey="u" href="/docs/current/server-programming.html" title="Part V. Server Programming">Up</a></td> | |
| <td align="right" width="40%"> <a accesskey="n" href="/docs/current/xplang-install.html" title="40.1. Installing Procedural Languages">Next</a></td> | |
| </tr> | |
| <tr> | |
| <td align="left" valign="top" width="40%">39.7. Rules Versus Triggers </td> | |
| <td align="center" width="20%"><a accesskey="h" href="/docs/current/index.html" title="PostgreSQL 18.3 Documentation">Home</a></td> | |
| <td align="right" valign="top" width="40%"> 40.1. Installing Procedural Languages</td> | |
| </tr> | |
| </tbody></table> | |
| </div> | |
| </div> | |
| <div id="docComments"> | |
| <h2>Submit correction</h2> | |
| <p> | |
| If you see anything in the documentation that is not correct, does not match | |
| your experience with the particular feature or requires further clarification, | |
| please use | |
| <a href="/account/comments/new/18/xplang.html/" rel="nofollow">this form</a> | |
| to report a documentation issue. | |
| </p> | |
| </div> | |
| </div> <!-- pgContentWrap --> | |
| </div> | |
| </div> | |
| <!-- Footer --> | |
| <footer id="footer"> | |
| <!-- Copyright --> | |
| <div class="container"> | |
| <a href="/about/policies/">Policies</a> | | |
| <a href="/about/policies/coc/">Code of Conduct</a> | | |
| <a href="/about/">About PostgreSQL</a> | | |
| <a href="/about/contact/">Contact</a><br/> | |
| <p>Copyright © 1996-2026 The PostgreSQL Global Development Group</p> | |
| </div> | |
| </footer> | |
| <script src="/media/js/main.js?54a05eb2"></script> | |
| </body></html> |