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.
Summary: | "Create Table" functionality works different that SQL statement | ||
---|---|---|---|
Product: | db | Reporter: | Roman Mostyka <romanmostyka> |
Component: | Code | Assignee: | Jiri Skrivanek <jskrivanek> |
Status: | RESOLVED WONTFIX | ||
Severity: | blocker | CC: | sustaining |
Priority: | P3 | ||
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | |
Bug Depends on: | |||
Bug Blocks: | 152581 |
Description
Roman Mostyka
2008-09-30 13:34:50 UTC
You need to quote the column name when it uses non-standard characters like "-", just like you do in the SQL. Please re-open if you can reproduce when you quote the column name in the create table dialog. With quotes everything works fine. But it isn't obvious that quotes should be used and actually it isn't very convenient for a customer. Probably it will be better if this quotes are added by IDE during creation of a table. I disagree. It's up to the user whether they should add quotes or not, I don't think we should be doing this automatically for users. We used to do this and it caused no end of confusion, and I actually spend a lot of time fixing things so this was no longer true. Just as the user needs to know to quote when typing SQL, they should know they need to quote when using the dialog, IMHO. If you disagree, please copy Mike and ask for his input. David, I think we have similar thing for MySQL DB creation, why we can't use similar approach here? I think it is similar problem like we had with MySQL, so I think we also should fix this issue. Can we use existing mechanism to add quotes to the name of a table? After further thought, I agree, we should quote using some heuristics about what needs to be quoted (we have an API that does this). I recently fixed this for the MySQL create database, as you noticed. The user may still need to quote in some cases. Thanks for finding this issue and re-opening it. David, can You take a look at this issue? This issue is P3, but it is very annoying and therefore this issue is going to be included into NetBeans 6.5 Patch 1. Please fix it till 27 November (this is code freeze date for Patch 1) or update this issue with justification why the fix isn't possible till this date. Thanks. OK, I'll take a look at it. The issue didn't pass the nomination process by nomination cut-off date. It has been marked as 65fixes2-candidate. I thought I fixed this. Roman, can you still see if you can reproduce? David, this issue is still reproducible. ;) The issue hasn't passed the nomination process for 65patch2 by cut-off date. It has been moved to 65patch3. Reassigned to new owner. The status whiteboard "65fixes4-candidate" has been removed. At this time our proactive patches for the NetBeans 6.5.x IDE have concluded. If you own a Sun service plan contract for NetBeans, you may wish to contact Sun Service http://www.sun.com/contact/support.jsp to request a fix via the product defect escalation process. For more information on purchasing a Sun service plan contract for NetBeans, refer to the service plan item "Sun Software Service Plans (S3P) for Developers" in the Sun Service table found on our NetBeans Support Resources page http://www.netbeans.org/kb/support.html As described in issue 87920, quoting of identifiers is not always desired. There was a fix to not quote newly created objects (see http://hg.netbeans.org/core-main/rev/55b630eefd2c). Maybe we can use for example SQLIdentifiers.createQuoter(spec.getMetaData()).quoteIfNeeded(getTableName()); but it is not obvious whether it works reliably. If yes, than we can also use it everywhere instead of "newobject" logic from #55b630eefd2c. Because there is only this single request to quote identifiers, we will not implement it and we let users to quote what they want by hand. |