Issue Details (XML | Word | Printable)

Key: CORE-1508
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Unassigned
Reporter: Claudio Valderrama C.
Votes: 0
Watchers: 0
Operations

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

Column aliases still missing even in trivial cases.

Created: 12/Sep/07 11:08 PM   Updated: 12/Sep/07 11:08 PM
Component/s: Engine
Affects Version/s: 1.0.3, 1.5.2, 1.5.3, 2.0.0, 1.5.4, 2.0.1, 2.1 Alpha 1, 2.1 Beta 1, 2.0.2, 2.0.3, 2.1 Beta 2, 2.1 RC1, 2.1.0, 2.0.4, 3.0 RC2
Fix Version/s: None

Environment: Platform independent.


 Description  « Hide
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;

    CONSTANT GEN_ID
============ ============ ===================== =====================
           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>


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