I am using Oracle 19c as well. There seems to be another bug present:
with
function f(x number)
return clob sql_macro as begin return q''
select f.x
''; end;
select * from f(42);
Results in:
ORA-00600: internal error code, arguments: [kxes_sqlcomp_check_macro-1], [], [], [], [], [], [], [], [], [], [], []
00600. 00000 - "internal error code, arguments: [%s], [%s], [%s], [%s], [%s], [%s], [%s], [%s], [%s], [%s], [%s], [%s]"
*Cause: This is the generic internal error number for Oracle program
exceptions. It indicates that a process has encountered a low-level,
unexpected condition. The first argument is the internal message
number. This argument and the database version number are critical in
identifying the root cause and the potential impact to your system.
Returning a clob (without the sql_macro) works just fine
with
function f(x number)
return clob as begin return q''
select ''||f.x;
end;
select f(42) from dual;
This seems to be a bug, I'd guess?
Does this bug still persist in Oracle versions beyond 19c?