Re: BUG #5254: can't drop a table

Lists: pgsql-bugs
From: "fwoncn" <fwoncn(at)gmail(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #5254: can't drop a table
Date: 2009-12-23 15:49:46
Message-ID: 200912231549.nBNFnk8t032095@wwwmaster.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs


The following bug has been logged online:

Bug reference: 5254
Logged by: fwoncn
Email address: fwoncn(at)gmail(dot)com
PostgreSQL version: 8.3
Operating system: Windows XP
Description: can't drop a table
Details:

I created a table named 'order' which is a reserved word in SQL by mistake
in the pgAdmin bundled with the official distribution. and now a can't drop
it in whatever way. in pgAdmin, the program hangs up when i click on that
table. and i can't drop it using the SQL line: drop table order, cuz order
is a reserved word and it's a wrong command.
I think it's definitely a bug.


From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: fwoncn <fwoncn(at)gmail(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #5254: can't drop a table
Date: 2009-12-23 17:38:46
Message-ID: 4B3255A6.2090309@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

fwoncn wrote:
> I created a table named 'order' which is a reserved word in SQL by mistake
> in the pgAdmin bundled with the official distribution. and now a can't drop
> it in whatever way. in pgAdmin, the program hangs up when i click on that
> table. and i can't drop it using the SQL line: drop table order, cuz order
> is a reserved word and it's a wrong command.
> I think it's definitely a bug.

Dunno about the pgAdmin issue, but try double-quoting the table name:

DROP TABLE "order";

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com


From: Devrim GÜNDÜZ <devrim(at)gunduz(dot)org>
To: fwoncn <fwoncn(at)gmail(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #5254: can't drop a table
Date: 2009-12-24 22:20:11
Message-ID: 1261693211.2594.17.camel@hp-laptop2.gunduz.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

On Wed, 2009-12-23 at 15:49 +0000, fwoncn wrote:
> I created a table named 'order' which is a reserved word in SQL by
> mistake in the pgAdmin bundled with the official distribution. and now
> a can't drop it in whatever way. in pgAdmin, the program hangs up when
> i click on that table. and i can't drop it using the SQL line: drop
> table order, cuz order is a reserved word and it's a wrong command.

Add double quotes around order:

DROP TABLE "order";

--
Devrim GÜNDÜZ, RHCE
Command Prompt - http://www.CommandPrompt.com
devrim~gunduz.org, devrim~PostgreSQL.org, devrim.gunduz~linux.org.tr
http://www.gunduz.org Twitter: http://twitter.com/devrimgunduz