DROP TABLESPACE

NameDROP TABLESPACE -- remove a tablespace Synopsis DROP TABLESPACE [ IF EXISTS ] name Description DROP TABLESPACE removes a tablespace from the system. A tablespace can only be dropped by its owner or a superuser. The tablespace must be empty of all database objects before it can be dropped. It is possible that objects in other databases might still reside in the tablespace even if no objects in the current database are using the tablespace. Also, if the tablespace is listed in the t

DROP TABLE

NameDROP TABLE -- remove a table Synopsis DROP TABLE [ IF EXISTS ] name [, ...] [ CASCADE | RESTRICT ] Description DROP TABLE removes tables from the database. Only the table owner, the schema owner, and superuser can drop a table. To empty a table of rows without destroying the table, use DELETE or TRUNCATE. DROP TABLE always removes any indexes, rules, triggers, and constraints that exist for the target table. However, to drop a table that is referenced by a view or a foreign-key co

DROP SERVER

NameDROP SERVER -- remove a foreign server descriptor Synopsis DROP SERVER [ IF EXISTS ] name [ CASCADE | RESTRICT ] Description DROP SERVER removes an existing foreign server descriptor. To execute this command, the current user must be the owner of the server. Parameters IF EXISTS Do not throw an error if the server does not exist. A notice is issued in this case. name The name of an existing server. CASCADE Automatically drop objects that depend on the server (such as user

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

DROP SCHEMA

NameDROP SCHEMA -- remove a schema Synopsis DROP SCHEMA [ IF EXISTS ] name [, ...] [ CASCADE | RESTRICT ] Description DROP SCHEMA removes schemas from the database. A schema can only be dropped by its owner or a superuser. Note that the owner can drop the schema (and thereby all contained objects) even if they do not own some of the objects within the schema. Parameters IF EXISTS Do not throw an error if the schema does not exist. A notice is issued in this case. name The name

DROP RULE

NameDROP RULE -- remove a rewrite rule Synopsis DROP RULE [ IF EXISTS ] name ON table_name [ CASCADE | RESTRICT ] Description DROP RULE drops a rewrite rule. Parameters IF EXISTS Do not throw an error if the rule does not exist. A notice is issued in this case. name The name of the rule to drop. table_name The name (optionally schema-qualified) of the table or view that the rule applies to. CASCADE Automatically drop objects that depend on the rule, and in turn all objects

DROP ROLE

NameDROP ROLE -- remove a database role Synopsis DROP ROLE [ IF EXISTS ] name [, ...] Description DROP ROLE removes the specified role(s). To drop a superuser role, you must be a superuser yourself; to drop non-superuser roles, you must have CREATEROLE privilege. A role cannot be removed if it is still referenced in any database of the cluster; an error will be raised if so. Before dropping the role, you must drop all the objects it owns (or reassign their ownership) and revoke any pr

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

DROP OWNED

NameDROP OWNED -- remove database objects owned by a database role Synopsis DROP OWNED BY { name | CURRENT_USER | SESSION_USER } [, ...] [ CASCADE | RESTRICT ] Description DROP OWNED drops all the objects within the current database that are owned by one of the specified roles. Any privileges granted to the given roles on objects in the current database and on shared objects (databases, tablespaces) will also be revoked. Parameters name The name of a role whose objects will be dr

DROP OPERATOR FAMILY

NameDROP OPERATOR FAMILY -- remove an operator family Synopsis DROP OPERATOR FAMILY [ IF EXISTS ] name USING index_method [ CASCADE | RESTRICT ] Description DROP OPERATOR FAMILY drops an existing operator family. To execute this command you must be the owner of the operator family. DROP OPERATOR FAMILY includes dropping any operator classes contained in the family, but it does not drop any of the operators or functions referenced by the family. If there are any indexes depending on op