Issue Details (XML | Word | Printable)

Key: CORE-4774
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Adriano dos Santos Fernandes
Reporter: Pavel Zotov
Votes: 0
Watchers: 2
Operations

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

Table aliasing is unnecessary required when doing UPDATE ... RETURNING RDB$ pseudo-columns

Created: 25/Apr/15 04:51 PM   Updated: 28/May/15 02:14 PM
Component/s: None
Affects Version/s: None
Fix Version/s: 3.0 Beta 2

QA Status: Done successfully


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

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