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

                 Key: CORE-5738
                 URL: http://tracker.firebirdsql.org/browse/CORE-5738
             Project: Firebird Core
          Issue Type: Improvement
          Components: Engine, ISQL
    Affects Versions: 3.0.3, 2.5.8, 4.0 Alpha 1
            Reporter: Pavel Zotov
            Priority: Minor


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
SQL>
===

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
 -NO_SUCH_TABLE



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to