System Catalogs

Table 50-1 lists the system catalogs. More detailed documentation of each catalog follows below. Most system catalogs are copied from the template database during database creation and are thereafter database-specific. A few catalogs are physically shared across all databases in a cluster; these are noted in the descriptions of the individual catalogs. Table 50-1. System Catalogs Catalog Name Purpose pg_aggregate aggregate functions pg_am index access methods pg_amop access method operators p

xml2

The xml2 module provides XPath querying and XSLT functionality. F.46.1. Deprecation Notice From PostgreSQL 8.3 on, there is XML-related functionality based on the SQL/XML standard in the core server. That functionality covers XML syntax checking and XPath queries, which is what this module does, and more, but the API is not at all compatible. It is planned that this module will be removed in a future version of PostgreSQL in favor of the newer standard API, so you are encouraged to try convert

Encryption Options

PostgreSQL offers encryption at several levels, and provides flexibility in protecting data from disclosure due to database server theft, unscrupulous administrators, and insecure networks. Encryption might also be required to secure sensitive data such as medical records or financial transactions. Password Storage Encryption By default, database user passwords are stored as MD5 hashes, so the administrator cannot determine the actual password assigned to the user. If MD5 encryption is used f

Window Functions

Window functions provide the ability to perform calculations across sets of rows that are related to the current query row. See Section 3.5 for an introduction to this feature, and Section 4.2.8 for syntax details. The built-in window functions are listed in Table 9-56. Note that these functions must be invoked using window function syntax; that is an OVER clause is required. In addition to these functions, any built-in or user-defined normal aggregate function (but not ordered-set or hypotheti

Catalogs: pg_trigger

The catalog pg_trigger stores triggers on tables and views. See CREATE TRIGGER for more information. Table 50-49. pg_trigger Columns Name Type References Description oid oid Row identifier (hidden attribute; must be explicitly selected) tgrelid oid pg_class.oid The table this trigger is on tgname name Trigger name (must be unique among triggers of same table) tgfoid oid pg_proc.oid The function to be called tgtype int2 Bit mask identifying trigger firing conditions tgenabled char Cont

isn

The isn module provides data types for the following international product numbering standards: EAN13, UPC, ISBN (books), ISMN (music), and ISSN (serials). Numbers are validated on input according to a hard-coded list of prefixes; this list of prefixes is also used to hyphenate numbers on output. Since new prefixes are assigned from time to time, the list of prefixes may be out of date. It is hoped that a future version of this module will obtained the prefix list from one or more tables that c

Catalogs: pg_inherits

The catalog pg_inherits records information about table inheritance hierarchies. There is one entry for each direct child table in the database. (Indirect inheritance can be determined by following chains of entries.) Table 50-27. pg_inherits Columns Name Type References Description inhrelid oid pg_class.oid The OID of the child table inhparent oid pg_class.oid The OID of the parent table inhseqno int4 If there is more than one direct parent for a child table (multiple inheritance), this nu

Server Configuration: Version and Platform Compatibility

19.13.1. Previous PostgreSQL Versions array_nulls (boolean) This controls whether the array input parser recognizes unquoted NULL as specifying a null array element. By default, this is on, allowing array values containing null values to be entered. However, PostgreSQL versions before 8.2 did not support null values in arrays, and therefore would treat NULL as specifying a normal array element with the string value "NULL". For backward compatibility with applications that require the old be

Catalogs: pg_policies

The view pg_policies provides access to useful information about each row-level security policy in the database. Table 50-68. pg_policies Columns Name Type References Description schemaname name pg_namespace.nspname Name of schema containing table policy is on tablename name pg_class.relname Name of table policy is on policyname name pg_policy.polname Name of policy roles name[] The roles to which this policy applies cmd text The command type to which the policy is applied qual text The

Internals//Physical Storage: TOAST

This section provides an overview of TOAST (The Oversized-Attribute Storage Technique). PostgreSQL uses a fixed page size (commonly 8 kB), and does not allow tuples to span multiple pages. Therefore, it is not possible to store very large field values directly. To overcome this limitation, large field values are compressed and/or broken up into multiple physical rows. This happens transparently to the user, with only small impact on most of the backend code. The technique is affectionately know