Column aliases still missing even in trivial cases. [CORE1508] #1923
Labels
affect-version: 1.0.3
affect-version: 1.5.2
affect-version: 1.5.3
affect-version: 1.5.4
affect-version: 2.0.0
affect-version: 2.0.1
affect-version: 2.0.2
affect-version: 2.0.3
affect-version: 2.0.4
affect-version: 2.1 Alpha 1
affect-version: 2.1 Beta 1
affect-version: 2.1 Beta 2
affect-version: 2.1 RC1
affect-version: 2.1.0
affect-version: 3.0 RC2
component: engine
priority: major
type: bug
Submitted by: Claudio Valderrama C. (robocop)
It seems that giving each unnamed column an automatic alias in FB has become a labor for Hercules since FB1 because we can't put an end to the surprises. These are trivial examples:
SQL> select 1, -1, gen_id(rdb$trigger_name, 0), -gen_id(rdb$trigger_name, 0) from rdb$database;
============ ============ ===================== =====================
1 -1 0 0
SQL> select NULL, -NULL from rdb$database;
CONSTANT
======== ============
<null> <null>
It's hard to explain the end user that because DSQL treats negatives as
neg(absolute_value)
it's seen as an expression by the server and a default column alias is not produced. Generally, each negative expression like
select -char_length('') from rdb$database;
has the same problem of being an unnamed column. I have a fix for the trivial cases of NULL and constant, only:
SQL> set list;
SQL> select 1, -1, NULL, -NULL from rdb$database;
CONSTANT 1
CONSTANT -1
CONSTANT <null>
CONSTANT <null>
Commits: 874d8bb
The text was updated successfully, but these errors were encountered: