Re: dropping a rule find an error

Lists: pgsql-general
From: Prabu Subroto <prabu_subroto(at)yahoo(dot)com>
To: Postgres General Milis <pgsql-general(at)postgresql(dot)org>
Subject: dropping a rule find an error
Date: 2004-08-03 09:54:50
Message-ID: 20040803095450.12823.qmail@web41812.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

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(at)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


From: Holger Klawitter <lists(at)klawitter(dot)de>
To: Prabu Subroto <prabu_subroto(at)yahoo(dot)com>, Postgres General Milis <pgsql-general(at)postgresql(dot)org>
Subject: Re: dropping a rule find an error
Date: 2004-08-03 10:28:02
Message-ID: 200408031228.07523.lists@klawitter.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

-----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-----