<HTML ><HEAD ><TITLE >Server Programming</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.73 "><LINK REV="MADE" HREF="mailto:pgsql-docs@postgresql.org"><LINK REL="HOME" TITLE="PostgreSQL 7.3.2 Documentation" HREF="index.html"><LINK REL="UP" TITLE="PostgreSQL 7.3.2 Programmer's Guide" HREF="programmer.html"><LINK REL="PREVIOUS" TITLE="export" HREF="pygresql-pglargeobject-export.html"><LINK REL="NEXT" TITLE="Architecture" HREF="arch-pg.html"><LINK REL="STYLESHEET" TYPE="text/css" HREF="stylesheet.css"><META NAME="creation" CONTENT="2003-02-03T20:17:34"></HEAD ><BODY CLASS="PART" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" ><DIV CLASS="NAVHEADER" ><TABLE SUMMARY="Header navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TH COLSPAN="3" ALIGN="center" >PostgreSQL 7.3.2 Documentation</TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="pygresql-pglargeobject-export.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" ></TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="arch-pg.html" ACCESSKEY="N" >Next</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><DIV CLASS="PART" ><A NAME="PROGRAMMER-SERVER" ></A ><DIV CLASS="TITLEPAGE" ><H1 CLASS="TITLE" >II. Server Programming</H1 ><DIV CLASS="PARTINTRO" ><A NAME="AEN31117" ></A ><P > This second part of the manual explains the <SPAN CLASS="PRODUCTNAME" >PostgreSQL</SPAN > approach to extensibility and describe how users can extend <SPAN CLASS="PRODUCTNAME" >PostgreSQL</SPAN > by adding user-defined types, operators, aggregates, and both query language and programming language functions. After a discussion of the <SPAN CLASS="PRODUCTNAME" >PostgreSQL</SPAN > rule system, we discuss the trigger and SPI interfaces. </P ></DIV ><DIV CLASS="TOC" ><DL ><DT ><B >Table of Contents</B ></DT ><DT >7. <A HREF="arch-pg.html" >Architecture</A ></DT ><DD ><DL ><DT >7.1. <A HREF="arch-pg.html#ARCH-PG-CONCEPTS" ><SPAN CLASS="PRODUCTNAME" >PostgreSQL</SPAN > Architectural Concepts</A ></DT ></DL ></DD ><DT >8. <A HREF="extend.html" >Extending <SPAN CLASS="ACRONYM" >SQL</SPAN >: An Overview</A ></DT ><DD ><DL ><DT >8.1. <A HREF="extend.html#EXTEND-HOW" >How Extensibility Works</A ></DT ><DT >8.2. <A HREF="type-system.html" >The <SPAN CLASS="PRODUCTNAME" >PostgreSQL</SPAN > Type System</A ></DT ><DT >8.3. <A HREF="pg-system-catalogs.html" >About the <SPAN CLASS="PRODUCTNAME" >PostgreSQL</SPAN > System Catalogs</A ></DT ></DL ></DD ><DT >9. <A HREF="xfunc.html" >Extending <SPAN CLASS="ACRONYM" >SQL</SPAN >: Functions</A ></DT ><DD ><DL ><DT >9.1. <A HREF="xfunc.html#XFUNC-INTRO" >Introduction</A ></DT ><DT >9.2. <A HREF="xfunc-sql.html" >Query Language (<SPAN CLASS="ACRONYM" >SQL</SPAN >) Functions</A ></DT ><DT >9.3. <A HREF="xfunc-pl.html" >Procedural Language Functions</A ></DT ><DT >9.4. <A HREF="xfunc-internal.html" >Internal Functions</A ></DT ><DT >9.5. <A HREF="xfunc-c.html" >C Language Functions</A ></DT ><DT >9.6. <A HREF="xfunc-overload.html" >Function Overloading</A ></DT ><DT >9.7. <A HREF="xfunc-tablefunctions.html" >Table Functions</A ></DT ><DT >9.8. <A HREF="xfunc-plhandler.html" >Procedural Language Handlers</A ></DT ></DL ></DD ><DT >10. <A HREF="xtypes.html" >Extending <SPAN CLASS="ACRONYM" >SQL</SPAN >: Types</A ></DT ><DT >11. <A HREF="xoper.html" >Extending <SPAN CLASS="ACRONYM" >SQL</SPAN >: Operators</A ></DT ><DD ><DL ><DT >11.1. <A HREF="xoper.html#XOPER-INTRO" >Introduction</A ></DT ><DT >11.2. <A HREF="xoper-example.html" >Example</A ></DT ><DT >11.3. <A HREF="xoper-optimization.html" >Operator Optimization Information</A ></DT ></DL ></DD ><DT >12. <A HREF="xaggr.html" >Extending <SPAN CLASS="ACRONYM" >SQL</SPAN >: Aggregates</A ></DT ><DT >13. <A HREF="rules.html" >The Rule System</A ></DT ><DD ><DL ><DT >13.1. <A HREF="rules.html#RULES-INTRO" >Introduction</A ></DT ><DT >13.2. <A HREF="querytree.html" >What is a Query Tree?</A ></DT ><DT >13.3. <A HREF="rules-views.html" >Views and the Rule System</A ></DT ><DT >13.4. <A HREF="rules-insert.html" >Rules on INSERT, UPDATE and DELETE</A ></DT ><DT >13.5. <A HREF="rules-permissions.html" >Rules and Permissions</A ></DT ><DT >13.6. <A HREF="rules-status.html" >Rules and Command Status</A ></DT ><DT >13.7. <A HREF="rules-triggers.html" >Rules versus Triggers</A ></DT ></DL ></DD ><DT >14. <A HREF="xindex.html" >Interfacing Extensions To Indexes</A ></DT ><DD ><DL ><DT >14.1. <A HREF="xindex.html#XINDEX-INTRO" >Introduction</A ></DT ><DT >14.2. <A HREF="xindex-am.html" >Access Methods and Operator Classes</A ></DT ><DT >14.3. <A HREF="xindex-strategies.html" >Access Method Strategies</A ></DT ><DT >14.4. <A HREF="xindex-support.html" >Access Method Support Routines</A ></DT ><DT >14.5. <A HREF="xindex-operators.html" >Creating the Operators and Support Routines</A ></DT ><DT >14.6. <A HREF="xindex-opclass.html" >Creating the Operator Class</A ></DT ><DT >14.7. <A HREF="xindex-opclass-features.html" >Special Features of Operator Classes</A ></DT ></DL ></DD ><DT >15. <A HREF="indexcost.html" >Index Cost Estimation Functions</A ></DT ><DT >16. <A HREF="triggers.html" >Triggers</A ></DT ><DD ><DL ><DT >16.1. <A HREF="triggers.html#TRIGGER-DEFINITION" >Trigger Definition</A ></DT ><DT >16.2. <A HREF="trigger-manager.html" >Interaction with the Trigger Manager</A ></DT ><DT >16.3. <A HREF="trigger-datachanges.html" >Visibility of Data Changes</A ></DT ><DT >16.4. <A HREF="trigger-examples.html" >Examples</A ></DT ></DL ></DD ><DT >17. <A HREF="spi.html" >Server Programming Interface</A ></DT ><DD ><DL ><DT >17.1. <A HREF="spi.html#SPI-INTERFACE" >Interface Functions</A ></DT ><DT >17.2. <A HREF="spi-interface-support.html" >Interface Support Functions</A ></DT ><DT >17.3. <A HREF="spi-memory.html" >Memory Management</A ></DT ><DT >17.4. <A HREF="spi-visibility.html" >Visibility of Data Changes</A ></DT ><DT >17.5. <A HREF="spi-examples.html" >Examples</A ></DT ></DL ></DD ></DL ></DIV ></DIV ></DIV ><DIV CLASS="NAVFOOTER" ><HR ALIGN="LEFT" WIDTH="100%"><TABLE SUMMARY="Footer navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" ><A HREF="pygresql-pglargeobject-export.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="index.html" ACCESSKEY="H" >Home</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="arch-pg.html" ACCESSKEY="N" >Next</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >export</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="programmer.html" ACCESSKEY="U" >Up</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >Architecture</TD ></TR ></TABLE ></DIV ></BODY ></HTML >