Skip to Main Content

SQL & PL/SQL

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!

PLS-00801: internal error [phd_get_defn:DI_U_NAM RHS] when using IS JSON on 19c

GregVMar 16 2020 — edited Mar 17 2020

Hello,

The version is 19.5 (tested on Oracle Live SQL). I get a PLS-00801 internal error when calling a function involving the IS JSON condition. This works fine on 12.2, I haven't tried on 12.1 or 18c.

Here's how you can reproduce:

create or replace package mypkg as

function is_json(p_data in clob)

return boolean;

end mypkg;

/

create or replace package body mypkg as

function is_json(p_data in clob)

return boolean

is

begin

return p_data is json;

end is_json;

end mypkg;

/

-- This is what fails with the PLS-00801 error

create or replace procedure p

is

begin

if mypkg.is_json('test') then

null;

end if;

end p;

/

Oracle Live SQL won't show the error, so you just need to run this query to see the error:

select * from user_errors;

pastedImage_2.png

Does anybody know what the error inside the brackets stand for? On MOS KB there's not much detail, few notes pertaining to old Forms/Reports problems. That being said, it seems the problem is with the function's name : is_json. If you rename it to isjson, then it compiles fine. I don't think is_json is a reserved expression so why the complain here?

Comments
Post Details
Added on Mar 16 2020
7 comments
1,966 views