From: michalk1 (JIRA) <tr...@fi...> - 2007-03-27 09:23:13
|
Union returns inconsistent field names -------------------------------------- Key: CORE-1181 URL: http://tracker.firebirdsql.org/browse/CORE-1181 Project: Firebird Core Issue Type: Bug Components: Engine Affects Versions: 2.0.1, 2.0.0 Environment: Windows XP Reporter: michalk1 Priority: Minor The following select (which doesn't make sense by itself, it's just a demonstration of the problem) returns different field names and precisions in FB2.0.(0/1) vs FB1.5.X, dialect 1 database: CREATE TABLE TESTTAB (ID NUMERIC(15, 2)); SELECT ID FROM TESTTAB GROUP BY ID UNION SELECT CAST(0 AS NUMERIC(15,2)) AS ID FROM RDB$DATABASE FB 1.5: ID ---- 0.00 FB 2.0: F_1 ----- 0.000 If i exchange the two selects in the union, i get: FB 1.5: ID ---- 0.00 FB 2.0: ID ----- 0.000 Although it's possible to workaround the problem by explicit typecasts and aliases in all branches of the union statement, this inconsistency doesn't look reasonable and affects backward compatibility. -- 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 |