Catalogs: pg_depend

The catalog pg_depend records the dependency relationships between database objects. This information allows DROP commands to find which other objects must be dropped by DROP CASCADE or prevent dropping in the DROP RESTRICT case. See also pg_shdepend, which performs a similar function for dependencies involving objects that are shared across a database cluster. Table 50-18. pg_depend Columns Name Type References Description classid oid pg_class.oid The OID of the system catalog the dependent

ABORT

NameABORT -- abort the current transaction Synopsis ABORT [ WORK | TRANSACTION ] Description ABORT rolls back the current transaction and causes all the updates made by the transaction to be discarded. This command is identical in behavior to the standard SQL command ROLLBACK, and is present only for historical reasons. Parameters WORKTRANSACTION Optional key words. They have no effect. Notes Use COMMIT to successfully terminate a transaction. Issuing ABORT outside of a tr

Catalogs: pg_cast

The catalog pg_cast stores data type conversion paths, both built-in and user-defined. It should be noted that pg_cast does not represent every type conversion that the system knows how to perform; only those that cannot be deduced from some generic rule. For example, casting between a domain and its base type is not explicitly represented in pg_cast. Another important exception is that "automatic I/O conversion casts", those performed using a data type's own I/O functions to convert to or from

REASSIGN OWNED

NameREASSIGN OWNED -- change the ownership of database objects owned by a database role Synopsis REASSIGN OWNED BY { old_role | CURRENT_USER | SESSION_USER } [, ...] TO { new_role | CURRENT_USER | SESSION_USER } Description REASSIGN OWNED instructs the system to change the ownership of database objects owned by any of the old_roles to new_role. Parameters old_role The name of a role. The ownership of all the objects within the current database, and of all shared ob

ALTER RULE

NameALTER RULE -- change the definition of a rule Synopsis ALTER RULE name ON table_name RENAME TO new_name Description ALTER RULE changes properties of an existing rule. Currently, the only available action is to change the rule's name. To use ALTER RULE, you must own the table or view that the rule applies to. Parameters name The name of an existing rule to alter. table_name The name (optionally schema-qualified) of the table or view that the rule applies to. new_name The n

CREATE TEXT SEARCH TEMPLATE

NameCREATE TEXT SEARCH TEMPLATE -- define a new text search template Synopsis CREATE TEXT SEARCH TEMPLATE name ( [ INIT = init_function , ] LEXIZE = lexize_function ) Description CREATE TEXT SEARCH TEMPLATE creates a new text search template. Text search templates define the functions that implement text search dictionaries. A template is not useful by itself, but must be instantiated as a dictionary to be used. The dictionary typically specifies parameters to be given to the

Internals//GIN Indexes

GIN stands for Generalized Inverted Index. GIN is designed for handling cases where the items to be indexed are composite values, and the queries to be handled by the index need to search for element values that appear within the composite items. For example, the items could be documents, and the queries could be searches for documents containing specific words. We use the word item to refer to a composite value that is to be indexed, and the word key to refer to an element value. GIN always st

DISCARD

NameDISCARD -- discard session state Synopsis DISCARD { ALL | PLANS | SEQUENCES | TEMPORARY | TEMP } Description DISCARD releases internal resources associated with a database session. This command is useful for partially or fully resetting the session's state. There are several subcommands to release different types of resources; the DISCARD ALL variant subsumes all the others, and also resets additional state. Parameters PLANS Releases all cached query plans, forcing re-plannin

DROP ACCESS METHOD

NameDROP ACCESS METHOD -- remove an access method Synopsis DROP ACCESS METHOD [ IF EXISTS ] name [ CASCADE | RESTRICT ] Description DROP ACCESS METHOD removes an existing access method. Only superusers can drop access methods. Parameters IF EXISTS Do not throw an error if the access method does not exist. A notice is issued in this case. name The name of an existing access method. CASCADE Automatically drop objects that depend on the access method (such as operator classes, o

CREATE SERVER

NameCREATE SERVER -- define a new foreign server Synopsis CREATE SERVER server_name [ TYPE 'server_type' ] [ VERSION 'server_version' ] FOREIGN DATA WRAPPER fdw_name [ OPTIONS ( option 'value' [, ... ] ) ] Description CREATE SERVER defines a new foreign server. The user who defines the server becomes its owner. A foreign server typically encapsulates connection information that a foreign-data wrapper uses to access an external data resource. Additional user-specific connection