Thread: Drop view

Drop view

From
Keith Siu
Date:
I 'm the fresh user in pgsql,

And now I'm using version 6.5.3 under linux red hat 6.2
I ve made a mistake to create a view " all staff" and can't drop it
everytime I descript or drop the view , it appear Error as below  :

template1> \d all staff;
ERROR: nodeRead : Bad type 0
template1>drop view all staff;
ERROR :parser: parser error at or near "all"


Kindly advise how to drop the view without error,

Thanks & regards


Re: Drop view

From
Tom Lane
Date:
Keith Siu <keith@kanetop.com> writes:
> I ve made a mistake to create a view " all staff" and can't drop it
> everytime I descript or drop the view , it appear Error as below  :

> template1> \d all staff;
> ERROR: nodeRead : Bad type 0
> template1>drop view all staff;
> ERROR :parser: parser error at or near "all"

Try quoting the name properly:

    drop view " all staff";

BTW, 6.5.3 is ancient.  Consider updating.

            regards, tom lane