DROP SEQUENCE

NameDROP SEQUENCE -- remove a sequence Synopsis DROP SEQUENCE [ IF EXISTS ] name [, ...] [ CASCADE | RESTRICT ] Description DROP SEQUENCE removes sequence number generators. A sequence can only be dropped by its owner or a superuser. Parameters IF EXISTS Do not throw an error if the sequence does not exist. A notice is issued in this case. name The name (optionally schema-qualified) of a sequence. CASCADE Automatically drop objects that depend on the sequence, and in turn all

SET ROLE

NameSET ROLE -- set the current user identifier of the current session Synopsis SET [ SESSION | LOCAL ] ROLE role_name SET [ SESSION | LOCAL ] ROLE NONE RESET ROLE Description This command sets the current user identifier of the current SQL session to be role_name. The role name can be written as either an identifier or a string literal. After SET ROLE, permissions checking for SQL commands is carried out as though the named role were the one that had logged in originally. The specifi

ALTER TABLESPACE

NameALTER TABLESPACE -- change the definition of a tablespace Synopsis ALTER TABLESPACE name RENAME TO new_name ALTER TABLESPACE name OWNER TO { new_owner | CURRENT_USER | SESSION_USER } ALTER TABLESPACE name SET ( tablespace_option = value [, ... ] ) ALTER TABLESPACE name RESET ( tablespace_option [, ... ] ) Description ALTER TABLESPACE can be used to change the definition of a tablespace. You must own the tablespace to change the definition of a tablespace. To alter the owner, you m

EXECUTE

NameEXECUTE -- execute a prepared statement Synopsis EXECUTE name [ ( parameter [, ...] ) ] Description EXECUTE is used to execute a previously prepared statement. Since prepared statements only exist for the duration of a session, the prepared statement must have been created by a PREPARE statement executed earlier in the current session. If the PREPARE statement that created the statement specified some parameters, a compatible set of parameters must be passed to the EXECUTE stateme

DROP POLICY

NameDROP POLICY -- remove a row level security policy from a table Synopsis DROP POLICY [ IF EXISTS ] name ON table_name [ CASCADE | RESTRICT ] Description DROP POLICY removes the specified policy from the table. Note that if the last policy is removed for a table and the table still has row level security enabled via ALTER TABLE, then the default-deny policy will be used. ALTER TABLE ... DISABLE ROW LEVEL SECURITY can be used to disable row level security for a table, whether policie

tsearch2

The tsearch2 module provides backwards-compatible text search functionality for applications that used tsearch2 before text searching was integrated into core PostgreSQL in release 8.3. F.41.1. Portability Issues Although the built-in text search features were based on tsearch2 and are largely similar to it, there are numerous small differences that will create portability issues for existing applications: Some functions' names were changed, for example rank to ts_rank. The replacement tsearc

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

Catalogs: pg_ts_config_map

The pg_ts_config_map catalog contains entries showing which text search dictionaries should be consulted, and in what order, for each output token type of each text search configuration's parser. PostgreSQL's text search features are described at length in Chapter 12. Table 50-51. pg_ts_config_map Columns Name Type References Description mapcfg oid pg_ts_config.oid The OID of the pg_ts_config entry owning this map entry maptokentype integer A token type emitted by the configuration's parser

Performance Tips: Non-Durable Settings

Durability is a database feature that guarantees the recording of committed transactions even if the server crashes or loses power. However, durability adds significant database overhead, so if your site does not require such a guarantee, PostgreSQL can be configured to run much faster. The following are configuration changes you can make to improve performance in such cases. Except as noted below, durability is still guaranteed in case of a crash of the database software; only abrupt operating

LOCK

NameLOCK -- lock a table Synopsis LOCK [ TABLE ] [ ONLY ] name [ * ] [, ...] [ IN lockmode MODE ] [ NOWAIT ] where lockmode is one of: ACCESS SHARE | ROW SHARE | ROW EXCLUSIVE | SHARE UPDATE EXCLUSIVE | SHARE | SHARE ROW EXCLUSIVE | EXCLUSIVE | ACCESS EXCLUSIVE Description LOCK TABLE obtains a table-level lock, waiting if necessary for any conflicting locks to be released. If NOWAIT is specified, LOCK TABLE does not wait to acquire the desired lock: if it cannot be acquired