Skip to content

Unable to restore database to Firebird 6.0 (with schemas) from ODS 13.1 if stored procedure/function has TYPE OF COLUMN parameter systemtable.systemcolumn. #8597

@sim1984

Description

@sim1984

Firebird Firebird-6.0.0.835-0-2cf29c1-windows-x64

I tried to restore the database using gbak from an ODS 13.1 backup and got the following error.

gbak: ERROR:Error while parsing function "PUBLIC"."COPY_DB_UTILS"."MAKE_BLOCK_FOR_TABLE"'s BLR
gbak: ERROR:    column "RDB$RELATION_NAME" does not exist in table/view "PUBLIC"."RDB$RELATIONS"
gbak: ERROR:    Exiting before completion due to errors
gbak:Exiting before completion due to errors

Investigation into the causes of this error revealed that the problem is in the package:

SET TERM ^ ;

CREATE OR ALTER PACKAGE COPY_DB_UTILS
AS
BEGIN
  FUNCTION MAKE_BLOCK_FOR_TABLE (
      RELATION_NAME TYPE OF COLUMN RDB$RELATIONS.RDB$RELATION_NAME)
  RETURNS BLOB SUB_TYPE TEXT;

  /*  ... */

END^

RECREATE PACKAGE BODY COPY_DB_UTILS
AS
BEGIN
  FUNCTION MAKE_BLOCK_FOR_TABLE (
      RELATION_NAME TYPE OF COLUMN RDB$RELATIONS.RDB$RELATION_NAME)
  RETURNS BLOB SUB_TYPE TEXT
  AS
  BEGIN
     SUSPEND;
  END
END

SET TERM ; ^

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions