---
name: "DROP_RULE"
section: "7"
platform: "linux"
package: "postgresql"
version: "18.6-4"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/DROP_RULE"
---

# DROP\_RULE(7)

remove a rewrite rule

## NAME

DROP\_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 that depend on those objects (see Section 5.15).

RESTRICT

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

## EXAMPLES

To drop the rewrite rule newrule:

```
DROP RULE newrule ON mytable;
```

## COMPATIBILITY

**DROP RULE** is a PostgreSQL language extension, as is the entire query rewrite system.

## SEE ALSO

CREATE RULE ([**CREATE\_RULE**(7)](/CREATE_RULE/7.md)), ALTER RULE ([**ALTER\_RULE**(7)](/ALTER_RULE/7.md))
