Issue with syntax of quotation highlighted as incorrect

Toad (15.1.113.1379) displays a syntax error for following code:

declare
  i varchar2(2000);
begin
  i := 'a';
  i := i || q'[]'; --this line is the problem, exactly the q'[]'
  i := i || '';
  dbms_output.put_line(i);
end;

The execution works fine, but Toad interprets this code as buggy. Also, when used in packages, procedures are truncated in the package tree of the shema browser.

I see the problem in the Editor.

I don't see what you mean in the Schema Browser. For me, it is displayed properly there. Can you post a screen shot?

Every procedure/function after the block with q'' is missing in package tree, as you can see in the screenshot (procedure test2 is missing in package-body-tree)

CREATE OR REPLACE PACKAGE testpkg
AS
  PROCEDURE test;
  PROCEDURE test2;
END;
/

CREATE OR REPLACE PACKAGE BODY testpkg
AS
  PROCEDURE test
  AS
    i   VARCHAR2 (2000);
  BEGIN
    i   := 'a';
    i := i || q'[]'; --this line is the problem
    i   := i || '';
    DBMS_OUTPUT.put_line (i);
  END;

  PROCEDURE test2
  AS
    i   VARCHAR2 (2000);
  BEGIN
    i   := 'a';
    DBMS_OUTPUT.put_line (i);
  END;
END;
/

I see it with that package. Thanks.

We have a fix for it, but we are in code freeze now for version 16.0.

We'll release the fix into 16.1 beta.

1 Like