Drop view

Started by Keith Siualmost 25 years ago2 messagesgeneral
Jump to latest
#1Keith Siu
keith@kanetop.com

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

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Keith Siu (#1)
Re: Drop view

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