Skip to content

Firebird 6.0: DECLARE VARIABLE does not accept arbitrary expressions within declared routines #8956

@sim1984

Description

@sim1984
execute block
returns (i int)
as
  declare function f(x int) returns int
  as
  --  declare u int = x + 1;
  begin
    return x + 1;
  end

  declare g int = f(1);
begin
  i = g;
  suspend;
end

If you remove the comment inside declare function f(x int), you will get an error:

Column does not belong to referenced table.
Dynamic SQL Error.
SQL error code = -206.
Column unknown.
"X".
At line 6, column 21.
-------------------------------------------
SQLCODE: -206
SQLSTATE: 42S22
GDSCODE: 335544569

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions