Array Functions and Operators

Table 9-47 shows the operators available for array types. Table 9-47. Array Operators Operator Description Example Result = equal ARRAY[1.1,2.1,3.1]::int[] = ARRAY[1,2,3] t <> not equal ARRAY[1,2,3] <> ARRAY[1,2,4] t < less than ARRAY[1,2,3] < ARRAY[1,2,4] t > greater than ARRAY[1,4,3] > ARRAY[1,2,4] t <= less than or equal ARRAY[1,2,3] <= ARRAY[1,2,3] t >= greater than or equal ARRAY[1,4,3] >= ARRAY[1,4,3] t @> contains ARRAY[1,4,3] @> ARRAY[3,1] t &

DROP DATABASE

NameDROP DATABASE -- remove a database Synopsis DROP DATABASE [ IF EXISTS ] name Description DROP DATABASE drops a database. It removes the catalog entries for the database and deletes the directory containing the data. It can only be executed by the database owner. Also, it cannot be executed while you or anyone else are connected to the target database. (Connect to postgres or any other database to issue this command.) DROP DATABASE cannot be undone. Use it with care! Parameters

CREATE OPERATOR FAMILY

NameCREATE OPERATOR FAMILY -- define a new operator family Synopsis CREATE OPERATOR FAMILY name USING index_method Description CREATE OPERATOR FAMILY creates a new operator family. An operator family defines a collection of related operator classes, and perhaps some additional operators and support functions that are compatible with these operator classes but not essential for the functioning of any individual index. (Operators and functions that are essential to indexes should be gro

Full Text Search: Configuration Example

A text search configuration specifies all options necessary to transform a document into a tsvector: the parser to use to break text into tokens, and the dictionaries to use to transform each token into a lexeme. Every call of to_tsvector or to_tsquery needs a text search configuration to perform its processing. The configuration parameter default_text_search_config specifies the name of the default configuration, which is the one used by text search functions if an explicit configuration param

Archive Recovery Settings

restore_command (string) The local shell command to execute to retrieve an archived segment of the WAL file series. This parameter is required for archive recovery, but optional for streaming replication. Any %f in the string is replaced by the name of the file to retrieve from the archive, and any %p is replaced by the copy destination path name on the server. (The path name is relative to the current working directory, i.e., the cluster's data directory.) Any %r is replaced by the name of

DROP OPERATOR

NameDROP OPERATOR -- remove an operator Synopsis DROP OPERATOR [ IF EXISTS ] name ( { left_type | NONE } , { right_type | NONE } ) [ CASCADE | RESTRICT ] Description DROP OPERATOR drops an existing operator from the database system. To execute this command you must be the owner of the operator. Parameters IF EXISTS Do not throw an error if the operator does not exist. A notice is issued in this case. name The name (optionally schema-qualified) of an existing operator. left_typ

CREATE TEXT SEARCH DICTIONARY

NameCREATE TEXT SEARCH DICTIONARY -- define a new text search dictionary Synopsis CREATE TEXT SEARCH DICTIONARY name ( TEMPLATE = template [, option = value [, ... ]] ) Description CREATE TEXT SEARCH DICTIONARY creates a new text search dictionary. A text search dictionary specifies a way of recognizing interesting or uninteresting words for searching. A dictionary depends on a text search template, which specifies the functions that actually perform the work. Typically the di

ALTER USER

NameALTER USER -- change a database role Synopsis ALTER USER role_specification [ WITH ] option [ ... ] where option can be: SUPERUSER | NOSUPERUSER | CREATEDB | NOCREATEDB | CREATEROLE | NOCREATEROLE | INHERIT | NOINHERIT | LOGIN | NOLOGIN | REPLICATION | NOREPLICATION | BYPASSRLS | NOBYPASSRLS | CONNECTION LIMIT connlimit | [ ENCRYPTED | UNENCRYPTED ] PASSWORD 'password' | VALID UNTIL 'timestamp' ALTER USER name RENAME TO new_name ALTER USER

DROP TRIGGER

NameDROP TRIGGER -- remove a trigger Synopsis DROP TRIGGER [ IF EXISTS ] name ON table_name [ CASCADE | RESTRICT ] Description DROP TRIGGER removes an existing trigger definition. To execute this command, the current user must be the owner of the table for which the trigger is defined. Parameters IF EXISTS Do not throw an error if the trigger does not exist. A notice is issued in this case. name The name of the trigger to remove. table_name The name (optionally schema-qualifi

DROP TRANSFORM

NameDROP TRANSFORM -- remove a transform Synopsis DROP TRANSFORM [ IF EXISTS ] FOR type_name LANGUAGE lang_name [ CASCADE | RESTRICT ] Description DROP TRANSFORM removes a previously defined transform. To be able to drop a transform, you must own the type and the language. These are the same privileges that are required to create a transform. Parameters IF EXISTS Do not throw an error if the transform does not exist. A notice is issued in this case. type_name The name of the da