Issue Details (XML | Word | Printable)

Key: CORE-6176
Type: Bug Bug
Status: Open Open
Priority: Trivial Trivial
Assignee: Unassigned
Reporter: Karol Bieniaszewski
Votes: 0
Watchers: 6
Operations

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

Name for the field "CURRENT_USER" is "USER" after select

Created: 31/Oct/19 08:48 AM   Updated: 31/Oct/19 10:15 AM
Component/s: Engine
Affects Version/s: 3.0.5
Fix Version/s: None

QA Status: No test


 Description  « Hide
SELECT CURRENT_USER, CURRENT_TRANSACTION, CURRENT_TIME, CURRENT_DATE, CURRENT_TIMESTAMP, LOCALTIME, LOCALTIMESTAMP FROM RDB$DATABASE

result:
USER CURRENT_TRANSACTION CURRENT_TIME CURRENT_DATE CURRENT_TIMESTAMP LOCALTIME LOCALTIMESTAMP
SYSDBA 268705 09:45:44 2019-10-31 2019-10-31 09:45:44 09:45:44 2019-10-31 09:45:44

as you can see CURRENT_USER is named as "USER" all other variable names are ok

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Mark Rotteveel added a comment - 31/Oct/19 10:15 AM
I'm not sure if it is really a bug. Originally, the function/context variable was USER, and in Firebird 1.0, CURRENT_USER was added as - essentially - an alias for USER. Both USER and CURRENT_USER identify the same functionality, and it is added with the column alias USER.This is similar that doing SELECT 1 + 2 from rd$database will add a column alias ADD by default.

That said, changing this so the actual variable name used is reported is probably less confusing.