This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Thu May 16 21:01:57 MDT 2002: java.io.IOException: Unable to execute a command: alter table "users" drop "username" ERROR: parser: parse error at or near "" java.io.IOException: Unable to execute a command: alter table "users" drop "username" ERROR: parser: parse error at or near "" at org.netbeans.modules.db.explorer.infos.ColumnNodeInfo.delete(ColumnNodeInfo.java:71) at org.netbeans.modules.db.explorer.nodes.DatabaseNode.destroy(DatabaseNode.java:157) at org.openide.explorer.ExplorerActions$DeleteActionPerformer$DestroyAtomic.invoke(ExplorerActions.java:527) at $Proxy4.run(Unknown Source) at org.openide.filesystems.EventControl.runAtomicAction(EventControl.java:89) at org.openide.filesystems.FileSystem.runAtomicAction(FileSystem.java:388) at org.openide.explorer.ExplorerActions$DestroyInvoker.run(ExplorerActions.java:568) at org.openide.explorer.ExplorerActions$DeleteActionPerformer.doDestroy(ExplorerActions.java:494) at org.openide.explorer.ExplorerActions$DeleteActionPerformer.performAction(ExplorerActions.java:463) at org.openide.util.actions.CallbackSystemAction.performAction(CallbackSystemAction.java:109) at org.openide.util.actions.CallableSystemAction.actionPerformed(CallableSystemAction.java:69) at org.netbeans.core.ModuleActions$1.run(ModuleActions.java:105) at org.openide.util.Task.run(Task.java:152) [catch] at org.openide.util.RequestProcessor$ProcessorThread.run(RequestProcessor.java:622)
Created attachment 5791 [details] IDE Log
Nick Pavlica: this is not a bug in "core" but in "db" module
Which database product and version do you use?
You are probably using PostgreSQL database. I investigated it a little bit and found that PostgreSQL doesn't support "drop column" clause in "alter table" command. (I think it's similiar to DB2 database.) We cannot fix it, I didn't find any command for dropping column. Workaround - you have to drop whole table and create it again without column you need to remove. Bear in mind you need to unload your data before dropping. Closing the bug as invalid. If somebody knows a command for dropping column from table, please reopen it and suggest your solution.
To remove a column, use this command: ALTER TABLE products DROP COLUMN description; http://developer.postgresql.org/docs/postgres/ddl-alter.html
I was able to delete table column with the current Database Explorer and PostreSQL 7.3.3. The generated command "ALTER TABLE table DROP column" was executed successfuly so closing as WORKSFORME. If you are still able to reprofuce your problem, feel free to reopen this issue and I will implement Martin's proposal.
VERIFIED