↑↓ select↵ open⌫ change scopeOpen full search

PG.CENTER connects PostgreSQL documentation, reference, and ecosystem knowledge. Maintained by Pigsty.

Wiki / SQL Commands

DROP ACCESS METHOD

remove an access method

English manual coverage begins with PostgreSQL 6.4. Source history and runtime observations have their own recorded version boundaries.

Reading PG 18·Select a recorded version

anchor
SQL-DROP-ACCESS-METHOD
file
sql-drop-access-method.html
lang
en
name
DROP ACCESS METHOD
purpose
remove an access method
purpose zh
移除一个访问方法
sections same as
Unknown
slug
18
synopsis html
DROP ACCESS METHOD [ IF EXISTS ] <em class="replaceable"><code>name</code></em> [ CASCADE | RESTRICT ]
synopsis text
DROP ACCESS METHOD [ IF EXISTS ] name [ CASCADE | RESTRICT ]

Syntax

DROP ACCESS METHOD [ IF EXISTS ] name [ CASCADE | RESTRICT ]
Syntax diagrams

Read left to right. Branches are choices, bypasses are optional, loops repeat. Select an underlined parameter to open its rule.

DROP ACCESS METHOD IF EXISTS name CASCADE RESTRICT

Definition PG 18

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, operator families, and indexes), and in turn all objects that depend on those objects (see Section 5.15).

RESTRICT

Refuse to drop the access method if any objects depend on it. This is the default.

Examples

Drop the access method heptree:

DROP ACCESS METHOD heptree;

Compatibility

DROP ACCESS METHOD is a PostgreSQL extension.

See Also

CREATE ACCESS METHOD

Compare versions

Source references

Full definition and evidence JSON

Definition sources

center · PostgreSQL 18 · wiki-repair-20261023:c688e8c39340149b8747f946183987f0129057dcf1e57f17659e48fb41d45644

Text language: en · wiki-repair-20261023:c688e8c39340149b8747f946183987f0129057dcf1e57f17659e48fb41d45644