Thread: dropping a rule find an error

dropping a rule find an error

From
Prabu Subroto
Date:
Dear my friends...

I want to drop a rule but I get an error message.
Could you tell me my I can not drop (delete) the rule?

Thank you very much in advance.

ps: Here is my try underbelow:

postgres@patrix:~> psql kv
Welcome to psql 7.4.2, the PostgreSQL interactive
terminal.

Type:  \copyright for distribution terms
       \h for help with SQL commands
       \? for help on internal slash commands
       \g or terminate with semicolon to execute query
       \q to quit

kv=# create rule viewpatrixcust as on update to
viewpatrix do instead update customer set
firstname=new.firstname, lastname=new.lastname where
custid=old.custid;
ERROR:  rule "viewpatrixcust" for relation
"viewpatrix" already exists
kv=# drop rule viewpatrixcust;
ERROR:  syntax error at or near ";" at character 25
kv=#




__________________________________
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
http://promotions.yahoo.com/new_mail

Re: dropping a rule find an error

From
Holger Klawitter
Date:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

> I want to drop a rule but I get an error message.
> Could you tell me my I can not drop (delete) the rule?

Take a look at the refernece manual:

DROP RULE

Name
    DROP RULE -- remove a rewrite rule

Synopsis
    DROP RULE name ON relation [ CASCADE | RESTRICT ]
[...]

Mit freundlichem Gruß / With kind regards
    Holger Klawitter
- --
lists <at> klawitter <dot> de
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQFBD2i31Xdt0HKSwgYRAnXJAJ0S05l/3eOXzS+hlFiMWz0sKKDD9gCcD93C
4cOwwvQeQxuRHuZ5lQGGKcs=
=BPBW
-----END PGP SIGNATURE-----