2

I have created a rule using the following syntax:

CREATE [ OR REPLACE ] RULE name AS ON event
TO table [ WHERE condition ]
DO [ ALSO | INSTEAD ] { NOTHING | command | ( command ; command ... ) }

I now want to delete this rule and have been searching the documentation to explain how to do so, but I cannot seem to find the answer I am looking for.

Any advice would be appreciated.

Thanks.

2 Answers 2

2

Starting with PostgreSQL 8.2, the syntax is:

DROP RULE [ IF EXISTS ] name ON relation [ CASCADE | RESTRICT ]

Example:

DROP RULE newrule ON mytable;
Sign up to request clarification or add additional context in comments.

Comments

1

The syntax is:

DROP RULE

ref: https://www.postgresql.org/docs/current/static/sql-droprule.html

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.