36.1. How Extensibility Works#
Postgres Pro is extensible because its operation is catalog-driven. If you are familiar with standard relational database systems, you know that they store information about databases, tables, columns, etc., in what are commonly known as system catalogs. (Some systems call this the data dictionary.) The catalogs appear to the user as tables like any other, but theDBMS stores its internal bookkeeping in them. One key difference betweenPostgres Pro and standard relational database systems is thatPostgres Pro stores much more information in its catalogs: not only information about tables and columns, but also information about data types, functions, access methods, and so on. These tables can be modified by the user, and sincePostgres Pro bases its operation on these tables, this means thatPostgres Pro can be extended by users. By comparison, conventional database systems can only be extended by changing hardcoded procedures in the source code or by loading modules specially written by theDBMS vendor. ThePostgres Pro server can moreover incorporate user-written code into itself through dynamic loading. That is, the user can specify an object code file (e.g., a shared library) that implements a new type or function, andPostgres Pro will load it as required. Code written inSQL is even more trivial to add to the server. This ability to modify its operation“on the fly” makesPostgres Pro uniquely suited for rapid prototyping of new applications and storage structures.