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.

Bug 23644 - java.io.IOException: Unable to execute a command
Summary: java.io.IOException: Unable to execute a command
Status: VERIFIED WORKSFORME
Alias: None
Product: db
Classification: Unclassified
Component: Code (show other bugs)
Version: -S1S-
Hardware: PC Linux
: P3 blocker (vote)
Assignee: Radko Najman
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-05-17 04:08 UTC by Nick Pavlica
Modified: 2003-10-06 16:29 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
IDE Log (649.85 KB, text/plain)
2002-05-17 04:10 UTC, Nick Pavlica
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Pavlica 2002-05-17 04:08:52 UTC
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)
Comment 1 Nick Pavlica 2002-05-17 04:10:07 UTC
Created attachment 5791 [details]
IDE Log
Comment 2 _ ttran 2002-05-17 08:11:35 UTC
Nick Pavlica: this is not a bug in "core" but in "db" module
Comment 3 Pavel Flaska 2002-07-09 10:37:30 UTC
Which database product and version do you use?
Comment 4 Pavel Flaska 2002-07-09 10:45:35 UTC
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.
Comment 5 Martin Schovanek 2003-03-12 18:24:40 UTC
To remove a column, use this command:

ALTER TABLE products DROP COLUMN description;

http://developer.postgresql.org/docs/postgres/ddl-alter.html
Comment 6 Radko Najman 2003-09-09 14:04:24 UTC
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.
Comment 7 Martin Schovanek 2003-10-06 16:29:00 UTC
VERIFIED