summaryrefslogtreecommitdiffstats
path: root/doc/src/sgml/html/server-programming.html
blob: b0f023077391a9c0bba8d8d561553dd32c39c189 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
<?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>Part V. Server Programming</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="infoschema-views.html" title="37.66. views" /><link rel="next" href="extend.html" title="Chapter 38. Extending SQL" /></head><body id="docContent" class="container-fluid col-10"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="5" align="center">Part V. Server Programming</th></tr><tr><td width="10%" align="left"><a accesskey="p" href="infoschema-views.html" title="37.66. views">Prev</a> </td><td width="10%" align="left"><a accesskey="u" href="index.html" title="PostgreSQL 15.7 Documentation">Up</a></td><th width="60%" align="center">PostgreSQL 15.7 Documentation</th><td width="10%" align="right"><a accesskey="h" href="index.html" title="PostgreSQL 15.7 Documentation">Home</a></td><td width="10%" align="right"> <a accesskey="n" href="extend.html" title="Chapter 38. Extending SQL">Next</a></td></tr></table><hr /></div><div class="part" id="SERVER-PROGRAMMING"><div class="titlepage"><div><div><h1 class="title">Part V. Server Programming</h1></div></div></div><div class="partintro" id="id-1.8.2"><div></div><p>
    This part is about extending the server functionality with
    user-defined functions, data types, triggers, etc.  These are
    advanced topics which should probably be approached only after all
    the other user documentation about <span class="productname">PostgreSQL</span> has
    been understood.  Later chapters in this part describe the server-side
    programming languages available in the
    <span class="productname">PostgreSQL</span> distribution as well as
    general issues concerning server-side programming languages.  It
    is essential to read at least the earlier sections of <a class="xref" href="extend.html" title="Chapter 38. Extending SQL">Chapter 38</a> (covering functions) before diving into the
    material about server-side programming languages.
   </p><div class="toc"><p><strong>Table of Contents</strong></p><dl class="toc"><dt><span class="chapter"><a href="extend.html">38. Extending <acronym class="acronym">SQL</acronym></a></span></dt><dd><dl><dt><span class="sect1"><a href="extend-how.html">38.1. How Extensibility Works</a></span></dt><dt><span class="sect1"><a href="extend-type-system.html">38.2. The <span class="productname">PostgreSQL</span> Type System</a></span></dt><dt><span class="sect1"><a href="xfunc.html">38.3. User-Defined Functions</a></span></dt><dt><span class="sect1"><a href="xproc.html">38.4. User-Defined Procedures</a></span></dt><dt><span class="sect1"><a href="xfunc-sql.html">38.5. Query Language (<acronym class="acronym">SQL</acronym>) Functions</a></span></dt><dt><span class="sect1"><a href="xfunc-overload.html">38.6. Function Overloading</a></span></dt><dt><span class="sect1"><a href="xfunc-volatility.html">38.7. Function Volatility Categories</a></span></dt><dt><span class="sect1"><a href="xfunc-pl.html">38.8. Procedural Language Functions</a></span></dt><dt><span class="sect1"><a href="xfunc-internal.html">38.9. Internal Functions</a></span></dt><dt><span class="sect1"><a href="xfunc-c.html">38.10. C-Language Functions</a></span></dt><dt><span class="sect1"><a href="xfunc-optimization.html">38.11. Function Optimization Information</a></span></dt><dt><span class="sect1"><a href="xaggr.html">38.12. User-Defined Aggregates</a></span></dt><dt><span class="sect1"><a href="xtypes.html">38.13. User-Defined Types</a></span></dt><dt><span class="sect1"><a href="xoper.html">38.14. User-Defined Operators</a></span></dt><dt><span class="sect1"><a href="xoper-optimization.html">38.15. Operator Optimization Information</a></span></dt><dt><span class="sect1"><a href="xindex.html">38.16. Interfacing Extensions to Indexes</a></span></dt><dt><span class="sect1"><a href="extend-extensions.html">38.17. Packaging Related Objects into an Extension</a></span></dt><dt><span class="sect1"><a href="extend-pgxs.html">38.18. Extension Building Infrastructure</a></span></dt></dl></dd><dt><span class="chapter"><a href="triggers.html">39. Triggers</a></span></dt><dd><dl><dt><span class="sect1"><a href="trigger-definition.html">39.1. Overview of Trigger Behavior</a></span></dt><dt><span class="sect1"><a href="trigger-datachanges.html">39.2. Visibility of Data Changes</a></span></dt><dt><span class="sect1"><a href="trigger-interface.html">39.3. Writing Trigger Functions in C</a></span></dt><dt><span class="sect1"><a href="trigger-example.html">39.4. A Complete Trigger Example</a></span></dt></dl></dd><dt><span class="chapter"><a href="event-triggers.html">40. Event Triggers</a></span></dt><dd><dl><dt><span class="sect1"><a href="event-trigger-definition.html">40.1. Overview of Event Trigger Behavior</a></span></dt><dt><span class="sect1"><a href="event-trigger-matrix.html">40.2. Event Trigger Firing Matrix</a></span></dt><dt><span class="sect1"><a href="event-trigger-interface.html">40.3. Writing Event Trigger Functions in C</a></span></dt><dt><span class="sect1"><a href="event-trigger-example.html">40.4. A Complete Event Trigger Example</a></span></dt><dt><span class="sect1"><a href="event-trigger-table-rewrite-example.html">40.5. A Table Rewrite Event Trigger Example</a></span></dt></dl></dd><dt><span class="chapter"><a href="rules.html">41. The Rule System</a></span></dt><dd><dl><dt><span class="sect1"><a href="querytree.html">41.1. The Query Tree</a></span></dt><dt><span class="sect1"><a href="rules-views.html">41.2. Views and the Rule System</a></span></dt><dt><span class="sect1"><a href="rules-materializedviews.html">41.3. Materialized Views</a></span></dt><dt><span class="sect1"><a href="rules-update.html">41.4. Rules on <code class="command">INSERT</code>, <code class="command">UPDATE</code>, and <code class="command">DELETE</code></a></span></dt><dt><span class="sect1"><a href="rules-privileges.html">41.5. Rules and Privileges</a></span></dt><dt><span class="sect1"><a href="rules-status.html">41.6. Rules and Command Status</a></span></dt><dt><span class="sect1"><a href="rules-triggers.html">41.7. Rules Versus Triggers</a></span></dt></dl></dd><dt><span class="chapter"><a href="xplang.html">42. Procedural Languages</a></span></dt><dd><dl><dt><span class="sect1"><a href="xplang-install.html">42.1. Installing Procedural Languages</a></span></dt></dl></dd><dt><span class="chapter"><a href="plpgsql.html">43. <span class="application">PL/pgSQL</span><acronym class="acronym">SQL</acronym> Procedural Language</a></span></dt><dd><dl><dt><span class="sect1"><a href="plpgsql-overview.html">43.1. Overview</a></span></dt><dt><span class="sect1"><a href="plpgsql-structure.html">43.2. Structure of <span class="application">PL/pgSQL</span></a></span></dt><dt><span class="sect1"><a href="plpgsql-declarations.html">43.3. Declarations</a></span></dt><dt><span class="sect1"><a href="plpgsql-expressions.html">43.4. Expressions</a></span></dt><dt><span class="sect1"><a href="plpgsql-statements.html">43.5. Basic Statements</a></span></dt><dt><span class="sect1"><a href="plpgsql-control-structures.html">43.6. Control Structures</a></span></dt><dt><span class="sect1"><a href="plpgsql-cursors.html">43.7. Cursors</a></span></dt><dt><span class="sect1"><a href="plpgsql-transactions.html">43.8. Transaction Management</a></span></dt><dt><span class="sect1"><a href="plpgsql-errors-and-messages.html">43.9. Errors and Messages</a></span></dt><dt><span class="sect1"><a href="plpgsql-trigger.html">43.10. Trigger Functions</a></span></dt><dt><span class="sect1"><a href="plpgsql-implementation.html">43.11. <span class="application">PL/pgSQL</span> under the Hood</a></span></dt><dt><span class="sect1"><a href="plpgsql-development-tips.html">43.12. Tips for Developing in <span class="application">PL/pgSQL</span></a></span></dt><dt><span class="sect1"><a href="plpgsql-porting.html">43.13. Porting from <span class="productname">Oracle</span> PL/SQL</a></span></dt></dl></dd><dt><span class="chapter"><a href="pltcl.html">44. PL/Tcl — Tcl Procedural Language</a></span></dt><dd><dl><dt><span class="sect1"><a href="pltcl-overview.html">44.1. Overview</a></span></dt><dt><span class="sect1"><a href="pltcl-functions.html">44.2. PL/Tcl Functions and Arguments</a></span></dt><dt><span class="sect1"><a href="pltcl-data.html">44.3. Data Values in PL/Tcl</a></span></dt><dt><span class="sect1"><a href="pltcl-global.html">44.4. Global Data in PL/Tcl</a></span></dt><dt><span class="sect1"><a href="pltcl-dbaccess.html">44.5. Database Access from PL/Tcl</a></span></dt><dt><span class="sect1"><a href="pltcl-trigger.html">44.6. Trigger Functions in PL/Tcl</a></span></dt><dt><span class="sect1"><a href="pltcl-event-trigger.html">44.7. Event Trigger Functions in PL/Tcl</a></span></dt><dt><span class="sect1"><a href="pltcl-error-handling.html">44.8. Error Handling in PL/Tcl</a></span></dt><dt><span class="sect1"><a href="pltcl-subtransactions.html">44.9. Explicit Subtransactions in PL/Tcl</a></span></dt><dt><span class="sect1"><a href="pltcl-transactions.html">44.10. Transaction Management</a></span></dt><dt><span class="sect1"><a href="pltcl-config.html">44.11. PL/Tcl Configuration</a></span></dt><dt><span class="sect1"><a href="pltcl-procnames.html">44.12. Tcl Procedure Names</a></span></dt></dl></dd><dt><span class="chapter"><a href="plperl.html">45. PL/Perl — Perl Procedural Language</a></span></dt><dd><dl><dt><span class="sect1"><a href="plperl-funcs.html">45.1. PL/Perl Functions and Arguments</a></span></dt><dt><span class="sect1"><a href="plperl-data.html">45.2. Data Values in PL/Perl</a></span></dt><dt><span class="sect1"><a href="plperl-builtins.html">45.3. Built-in Functions</a></span></dt><dt><span class="sect1"><a href="plperl-global.html">45.4. Global Values in PL/Perl</a></span></dt><dt><span class="sect1"><a href="plperl-trusted.html">45.5. Trusted and Untrusted PL/Perl</a></span></dt><dt><span class="sect1"><a href="plperl-triggers.html">45.6. PL/Perl Triggers</a></span></dt><dt><span class="sect1"><a href="plperl-event-triggers.html">45.7. PL/Perl Event Triggers</a></span></dt><dt><span class="sect1"><a href="plperl-under-the-hood.html">45.8. PL/Perl Under the Hood</a></span></dt></dl></dd><dt><span class="chapter"><a href="plpython.html">46. PL/Python — Python Procedural Language</a></span></dt><dd><dl><dt><span class="sect1"><a href="plpython-funcs.html">46.1. PL/Python Functions</a></span></dt><dt><span class="sect1"><a href="plpython-data.html">46.2. Data Values</a></span></dt><dt><span class="sect1"><a href="plpython-sharing.html">46.3. Sharing Data</a></span></dt><dt><span class="sect1"><a href="plpython-do.html">46.4. Anonymous Code Blocks</a></span></dt><dt><span class="sect1"><a href="plpython-trigger.html">46.5. Trigger Functions</a></span></dt><dt><span class="sect1"><a href="plpython-database.html">46.6. Database Access</a></span></dt><dt><span class="sect1"><a href="plpython-subtransaction.html">46.7. Explicit Subtransactions</a></span></dt><dt><span class="sect1"><a href="plpython-transactions.html">46.8. Transaction Management</a></span></dt><dt><span class="sect1"><a href="plpython-util.html">46.9. Utility Functions</a></span></dt><dt><span class="sect1"><a href="plpython-python23.html">46.10. Python 2 vs. Python 3</a></span></dt><dt><span class="sect1"><a href="plpython-envar.html">46.11. Environment Variables</a></span></dt></dl></dd><dt><span class="chapter"><a href="spi.html">47. Server Programming Interface</a></span></dt><dd><dl><dt><span class="sect1"><a href="spi-interface.html">47.1. Interface Functions</a></span></dt><dt><span class="sect1"><a href="spi-interface-support.html">47.2. Interface Support Functions</a></span></dt><dt><span class="sect1"><a href="spi-memory.html">47.3. Memory Management</a></span></dt><dt><span class="sect1"><a href="spi-transaction.html">47.4. Transaction Management</a></span></dt><dt><span class="sect1"><a href="spi-visibility.html">47.5. Visibility of Data Changes</a></span></dt><dt><span class="sect1"><a href="spi-examples.html">47.6. Examples</a></span></dt></dl></dd><dt><span class="chapter"><a href="bgworker.html">48. Background Worker Processes</a></span></dt><dt><span class="chapter"><a href="logicaldecoding.html">49. Logical Decoding</a></span></dt><dd><dl><dt><span class="sect1"><a href="logicaldecoding-example.html">49.1. Logical Decoding Examples</a></span></dt><dt><span class="sect1"><a href="logicaldecoding-explanation.html">49.2. Logical Decoding Concepts</a></span></dt><dt><span class="sect1"><a href="logicaldecoding-walsender.html">49.3. Streaming Replication Protocol Interface</a></span></dt><dt><span class="sect1"><a href="logicaldecoding-sql.html">49.4. Logical Decoding <acronym class="acronym">SQL</acronym> Interface</a></span></dt><dt><span class="sect1"><a href="logicaldecoding-catalogs.html">49.5. System Catalogs Related to Logical Decoding</a></span></dt><dt><span class="sect1"><a href="logicaldecoding-output-plugin.html">49.6. Logical Decoding Output Plugins</a></span></dt><dt><span class="sect1"><a href="logicaldecoding-writer.html">49.7. Logical Decoding Output Writers</a></span></dt><dt><span class="sect1"><a href="logicaldecoding-synchronous.html">49.8. Synchronous Replication Support for Logical Decoding</a></span></dt><dt><span class="sect1"><a href="logicaldecoding-streaming.html">49.9. Streaming of Large Transactions for Logical Decoding</a></span></dt><dt><span class="sect1"><a href="logicaldecoding-two-phase-commits.html">49.10. Two-phase Commit Support for Logical Decoding</a></span></dt></dl></dd><dt><span class="chapter"><a href="replication-origins.html">50. Replication Progress Tracking</a></span></dt><dt><span class="chapter"><a href="archive-modules.html">51. Archive Modules</a></span></dt><dd><dl><dt><span class="sect1"><a href="archive-module-init.html">51.1. Initialization Functions</a></span></dt><dt><span class="sect1"><a href="archive-module-callbacks.html">51.2. Archive Module Callbacks</a></span></dt></dl></dd></dl></div></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="infoschema-views.html" title="37.66. views">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="index.html" title="PostgreSQL 15.7 Documentation">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="extend.html" title="Chapter 38. Extending SQL">Next</a></td></tr><tr><td width="40%" align="left" valign="top">37.66. <code class="literal">views</code> </td><td width="20%" align="center"><a accesskey="h" href="index.html" title="PostgreSQL 15.7 Documentation">Home</a></td><td width="40%" align="right" valign="top"> Chapter 38. Extending <acronym class="acronym">SQL</acronym></td></tr></table></div></body></html>