]> begriffs open source - ai-pg/blob - full-docs/txt/extend-how.txt
Convert HTML docs to more streamlined TXT
[ai-pg] / full-docs / txt / extend-how.txt
1
2 36.1. How Extensibility Works #
3
4    PostgreSQL is extensible because its operation is catalog-driven. If
5    you are familiar with standard relational database systems, you know
6    that they store information about databases, tables, columns, etc., in
7    what are commonly known as system catalogs. (Some systems call this the
8    data dictionary.) The catalogs appear to the user as tables like any
9    other, but the DBMS stores its internal bookkeeping in them. One key
10    difference between PostgreSQL and standard relational database systems
11    is that PostgreSQL stores much more information in its catalogs: not
12    only information about tables and columns, but also information about
13    data types, functions, access methods, and so on. These tables can be
14    modified by the user, and since PostgreSQL bases its operation on these
15    tables, this means that PostgreSQL can be extended by users. By
16    comparison, conventional database systems can only be extended by
17    changing hardcoded procedures in the source code or by loading modules
18    specially written by the DBMS vendor.
19
20    The PostgreSQL server can moreover incorporate user-written code into
21    itself through dynamic loading. That is, the user can specify an object
22    code file (e.g., a shared library) that implements a new type or
23    function, and PostgreSQL will load it as required. Code written in SQL
24    is even more trivial to add to the server. This ability to modify its
25    operation “on the fly” makes PostgreSQL uniquely suited for rapid
26    prototyping of new applications and storage structures.