Issue Details (XML | Word | Printable)

Key: CORE-5738
Type: Improvement Improvement
Status: Open Open
Priority: Minor Minor
Assignee: Unassigned
Reporter: Pavel Zotov
Votes: 0
Watchers: 1

If you were logged in you would be able to see more operations.
Firebird Core

Exception "unknown table" should be raised instead of "unknown columns" on attempt to create index for non-existent table

Created: 02/Feb/18 04:53 PM   Updated: 02/Feb/18 04:53 PM
Component/s: Engine, ISQL
Affects Version/s: 4.0 Alpha 1, 2.5.8, 3.0.3
Fix Version/s: None

QA Status: No test

 Description  « Hide
There is something strange in error message when i want to create index for NON-existent table.
Consider following script (doing it on empty database):
SQL> create index no_such_index on no_such_table( some_fantastic_column );
Statement failed, SQLSTATE = 42000
unsuccessful metadata update
-Unknown columns in index NO_SUCH_INDEX

Why "unknown COLUMNS" are mentioned here ? I just used wrong name of TABLE rather than column(s) of it.

IMO, much better to raise SQLSTATE = 42S02 ("-Table unknown"), similar to this case:
 SQL> select * from no_such_table;
 Statement failed, SQLSTATE = 42S02
 Dynamic SQL Error
 -SQL error code = -204
 -Table unknown

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
There are no comments yet on this issue.