0

I've got a view which accidentally (don't know how) lost it's name.

Now I can not drop it any longer because pgadmin III throws an error Error: syntax-error at the end of input Line 1:DROP VIEW public

Trying to rename it causes the error Error: syntax-error at "to" Line 1:ALTER TABLE RENAME TO NewName

The view definition is

CREATE OR REPLACE VIEW  AS 
 SELECT ...
   FROM table a;


ALTER TABLE OWNER TO postgres;
GRANT ALL ON TABLE  TO postgres;
1

1 Answer 1

0

Made a backup of the database, restrored it.

In the new database the invalid, nameless view has been dropped by pgadmin.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.