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

Table aliasing is unnecessary required when doing UPDATE ... RETURNING RDB$ pseudo-columns [CORE4774] #5073

Closed
firebird-automations opened this issue Apr 25, 2015 · 3 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: @pavel-zotov

On WI-T3.0.0.31810:

SQL> recreate table t(id int, x int);
SQL> commit;
SQL> insert into t values(1, 100);
SQL> commit;
SQL> insert into t(id, x) values(2, 200) returning rdb$db_key;

DB_KEY

8100000002000000

SQL> delete from t where id=1 returning rdb$db_key;

DB_KEY

8100000001000000

SQL> update t set x=-x where id=2 returning rdb$db_key;
Statement failed, SQLSTATE = 42702
Dynamic SQL Error
-SQL error code = -204
-Ambiguous field name between table T and table T and table T
-RDB$DB_KEY
SQL> update t set x=-x where id=2 returning T.rdb$db_key; --------------- note alias "T." left side 'rdb$db_key' pseudo-column

DB_KEY

8100000002000000

SQL> update t set x=-x where id=2 returning rdb$record_version;
Statement failed, SQLSTATE = 42702
Dynamic SQL Error
-SQL error code = -204
-Ambiguous field name between table T and table T and table T
-RDB$RECORD_VERSION
SQL> update t set x=-x where id=2 returning T.rdb$record_version; --------------- note alias "T." left side 'record_version' pseudo-column

RDB$RECORD_VERSION

            14

Commits: 94e9cc9 FirebirdSQL/fbt-repository@cfbeb07

@firebird-automations
Copy link
Collaborator Author

Modified by: @asfernandes

assignee: Adriano dos Santos Fernandes [ asfernandes ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @asfernandes

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

Fix Version: 3.0 Beta 2 [ 10586 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

status: Resolved [ 5 ] => Resolved [ 5 ]

QA Status: Done successfully

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

2 participants