Skip to Main Content

Oracle Database Free

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Bug: Multiline comments cannot be applied in GraphQL table function in an Oracle AI Database 26ai (23.26.0.0.0)

Multiline comments are documented in the SQL Language Reference for JSON-relational Duality Views (under Restrictions) and for the GRAPHQL table function.

However, when I use it in a GraphQL table function, I get an ORA-24558: syntax error in the input string. Here's an example:

select json_serialize(data pretty) as data
  from graphql('
          dept
          """
          This query requires a dept similar to this:
          create table dept (
             deptno number(2, 0)      not null constraint dept_pk primary key,
             dname  varchar2(14 char) not null,
             loc    varchar2(13 char) not null
          );
          """
          {
             _id: deptno,
             dname,
             loc
          }
       ');

It works when I change it to single-line comments like this (as long as the string literal does not start with a comment):

select json_serialize(data pretty) as data
  from graphql('
          dept
          #This query requires a dept similar to this:
          #create table dept (
          #   deptno number(2, 0)      not null constraint dept_pk primary key,
          #   dname  varchar2(14 char) not null,
          #   loc    varchar2(13 char) not null
          #);
          {
             _id: deptno,
             dname,
             loc
          }
       ');

IMO, this is either a documentation bug or an implementation bug.

Furthermore, it's interesting that multiline comments are not mentioned in Oracle Database Support for GraphQL Developer's Guide.

This post has been answered by Philipp Salvisberg on Oct 25 2025
Jump to Answer
Comments
Post Details
Added on Oct 25 2025
1 comment
123 views