Server Configuration: Customized Options

This feature was designed to allow parameters not normally known to PostgreSQL to be added by add-on modules (such as procedural languages). This allows extension modules to be configured in the standard ways. Custom options have two-part names: an extension name, then a dot, then the parameter name proper, much like qualified names in SQL. An example is plpgsql.variable_conflict. Because custom options may need to be set in processes that have not loaded the relevant extension module, PostgreS

Internals//GIN Indexes: Examples

The PostgreSQL source distribution includes GIN operator classes for tsvector and for one-dimensional arrays of all internal types. Prefix searching in tsvector is implemented using the GIN partial match feature. The following contrib modules also contain GIN operator classes: btree_gin B-tree equivalent functionality for several data types hstore Module for storing (key, value) pairs intarray Enhanced support for int[] pg_trgm Text similarity using trigram matching Prev Next Limit

Catalogs: pg_opfamily

The catalog pg_opfamily defines operator families. Each operator family is a collection of operators and associated support routines that implement the semantics specified for a particular index access method. Furthermore, the operators in a family are all "compatible", in a way that is specified by the access method. The operator family concept allows cross-data-type operators to be used with indexes and to be reasoned about using knowledge of access method semantics. Operator families are des

SAVEPOINT

NameSAVEPOINT -- define a new savepoint within the current transaction Synopsis SAVEPOINT savepoint_name Description SAVEPOINT establishes a new savepoint within the current transaction. A savepoint is a special mark inside a transaction that allows all commands that are executed after it was established to be rolled back, restoring the transaction state to what it was at the time of the savepoint. Parameters savepoint_name The name to give to the new savepoint. Notes Use RO

Date/Time Functions and Operators

Table 9-30 shows the available functions for date/time value processing, with details appearing in the following subsections. Table 9-29 illustrates the behaviors of the basic arithmetic operators (+, *, etc.). For formatting functions, refer to Section 9.8. You should be familiar with the background information on date/time data types from Section 8.5. All the functions and operators described below that take time or timestamp inputs actually come in two variants: one that takes time with time

DROP TEXT SEARCH TEMPLATE

NameDROP TEXT SEARCH TEMPLATE -- remove a text search template Synopsis DROP TEXT SEARCH TEMPLATE [ IF EXISTS ] name [ CASCADE | RESTRICT ] Description DROP TEXT SEARCH TEMPLATE drops an existing text search template. You must be a superuser to use this command. Parameters IF EXISTS Do not throw an error if the text search template does not exist. A notice is issued in this case. name The name (optionally schema-qualified) of an existing text search template. CASCADE Automati

pg_lsn Type

The pg_lsn data type can be used to store LSN (Log Sequence Number) data which is a pointer to a location in the XLOG. This type is a representation of XLogRecPtr and an internal system type of PostgreSQL. Internally, an LSN is a 64-bit integer, representing a byte position in the write-ahead log stream. It is printed as two hexadecimal numbers of up to 8 digits each, separated by a slash; for example, 16/B374D848. The pg_lsn type supports the standard comparison operators, like = and >. Two

pgcrypto

The pgcrypto module provides cryptographic functions for PostgreSQL. F.25.1. General Hashing Functions F.25.1.1. digest() digest(data text, type text) returns bytea digest(data bytea, type text) returns bytea Computes a binary hash of the given data. type is the algorithm to use. Standard algorithms are md5, sha1, sha224, sha256, sha384 and sha512. If pgcrypto was built with OpenSSL, more algorithms are available, as detailed in Table F-20. If you want the digest as a hexadecimal string, u

Numeric Types

Numeric types consist of two-, four-, and eight-byte integers, four- and eight-byte floating-point numbers, and selectable-precision decimals. Table 8-2 lists the available types. Table 8-2. Numeric Types Name Storage Size Description Range smallint 2 bytes small-range integer -32768 to +32767 integer 4 bytes typical choice for integer -2147483648 to +2147483647 bigint 8 bytes large-range integer -9223372036854775808 to +9223372036854775807 decimal variable user-specified precision, exact up

DROP MATERIALIZED VIEW

NameDROP MATERIALIZED VIEW -- remove a materialized view Synopsis DROP MATERIALIZED VIEW [ IF EXISTS ] name [, ...] [ CASCADE | RESTRICT ] Description DROP MATERIALIZED VIEW drops an existing materialized view. To execute this command you must be the owner of the materialized view. Parameters IF EXISTS Do not throw an error if the materialized view does not exist. A notice is issued in this case. name The name (optionally schema-qualified) of the materialized view to remove. C