DROP SUBSCRIPTION

DROP SUBSCRIPTION — remove a subscription

Synopsis

DROP SUBSCRIPTION [ IF EXISTS ] name [ CASCADE | RESTRICT ]

Description

DROP SUBSCRIPTION removes a subscription from the database cluster.

A subscription can only be dropped by a superuser.

DROP SUBSCRIPTION cannot be executed inside a transaction block if the subscription is associated with a replication slot. (You can use ALTER SUBSCRIPTION to unset the slot.)

Parameters

name

The name of a subscription to be dropped.

CASCADE
RESTRICT

These key words do not have any effect, since there are no dependencies on subscriptions.

Examples

Drop a subscription:

DROP SUBSCRIPTION mysub;

Compatibility

DROP SUBSCRIPTION is a PostgreSQL extension.

See Also

CREATE SUBSCRIPTION, ALTER SUBSCRIPTION