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

# ALTER\_RULE(7)

change the definition of a rule

## NAME

ALTER\_RULE - change the definition of a rule

## SYNOPSIS

```
ALTER RULE name ON table_name RENAME TO new_name
```

## DESCRIPTION

**ALTER RULE** changes properties of an existing rule. Currently, the only available action is to change the rule's name.

To use **ALTER RULE**, you must own the table or view that the rule applies to.

## PARAMETERS

*name*

The name of an existing rule to alter.

*table\_name*

The name (optionally schema-qualified) of the table or view that the rule applies to.

*new\_name*

The new name for the rule.

## EXAMPLES

To rename an existing rule:

```
ALTER RULE notify_all ON emp RENAME TO notify_me;
```

## COMPATIBILITY

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

## SEE ALSO

CREATE RULE ([**CREATE\_RULE**(7)](/CREATE_RULE/7.md)), DROP RULE ([**DROP\_RULE**(7)](/DROP_RULE/7.md))
