Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Name for the field "CURRENT_USER" is "USER" after select [CORE6176] #6423

Open
firebird-automations opened this issue Oct 31, 2019 · 1 comment

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: @livius2

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

@firebird-automations
Copy link
Collaborator Author

Commented by: @mrotteveel

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant