You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Consider following INCORRECT script (it contains wrong token in RETURNUNG clause: "AS" instead of "INTO"):
recreate table test(id int);
insert into test(id) values(null);
set term ^;
execute block as
declare v_id int;
beginupdate test set id =-id returning id as v_id; -- this is WRONG; "INTO" must be here
end
^
set term ;^
Statement failed, SQLSTATE = 42000
Dynamic SQL Error
-SQL error code = -104
-Unexpected end of command - line 4, column 40
(looks strange because all commands appear to have tokens of completion; but anyway, we can easy find problem place because of non-zero line/column values)
in FB 4.0.0.2479:
Statement failed, SQLSTATE = 42000
Dynamic SQL Error
-SQL error code = -104
-Unexpected end of command - line 0, column 0
This output is much worse: we can not find problem place because of zeroes for line/column.
The text was updated successfully, but these errors were encountered:
@asfernandes Did you mean "as alias in RETURNING columns"?
Yes. It may be useless in PSQL code, but is also supported there.
asfernandes
changed the title
Regression in FB 3.x / 4.x : "Unexpected end of command" when 'RETURNING' clause is used incorrectly inside execute block (expected: instead of "Token unknown" + non-zero line/column values)
Regression in FB 3.x / 4.x : "Unexpected end of command" with incorrect line/column info
May 13, 2021
asfernandes
changed the title
Regression in FB 3.x / 4.x : "Unexpected end of command" with incorrect line/column info
Regression in FB 4.x : "Unexpected end of command" with incorrect line/column info
Jun 26, 2022
Consider following INCORRECT script (it contains wrong token in RETURNUNG clause: "AS" instead of "INTO"):
Its output will be:
(looks strange because all commands appear to have tokens of completion; but anyway, we can easy find problem place because of non-zero line/column values)
This output is much worse: we can not find problem place because of zeroes for line/column.
The text was updated successfully, but these errors were encountered: