Regression(?): UNION allows to select data of different types (null, date,
double precision, string)
----------------------------------------------------------------------------------------------------
Key: CORE-5022
URL: http://tracker.firebirdsql.org/browse/CORE-5022
Project: Firebird Core
Issue Type: Bug
Reporter: Pavel Zotov
Consider following totally stupid query:
select null from rdb$database
union all
select current_date from rdb$database
union all
select 3.1415926 from rdb$database
union all
select 'qwerty' from rdb$database;
Output in 2.5.x and WI-T3.0.0.30566 Firebird 3.0 Alpha 1:
===
Statement failed, SQLSTATE = HY004
SQL error code = -104
-Datatypes are not comparable in expression UNION
===
Output in:
WI-T3.0.0.30809 Firebird 3.0 Alpha 2
WI-T3.0.0.31374 Firebird 3.0 Beta 1
WI-T3.0.0.31896 Firebird 3.0 Beta 2
WI-V3.0.0.32179 Firebird 3.0 Release Candidate 1:
- is:
===
<null>
2015-11-18
3.1415926
qwerty
===
PS. I'm not sure is this behaviour regression or no. Postgres raises error for
both following snippets:
select null
union all
select cast('now' as date)
union all
select 3.1415926
select null
union all
select 3.1415926
union all
select 'qwerty'
What SQL standard says about it ?
--
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
------------------------------------------------------------------------------
Firebird-Devel mailing list, web interface at
https://lists.sourceforge.net/lists/listinfo/firebird-devel