Oracle 将clob用作构造函数参数时出现的问题

Oracle 将clob用作构造函数参数时出现的问题,oracle,plsql,constructor,clob,Oracle,Plsql,Constructor,Clob,我有以下PL/SQL代码: create type testingclob as object ( member_value number, constructor function testingclob( i_aclob clob ) return self as result ); / create type body testingclob as constructor function testingclob( i_aclob clob

我有以下PL/SQL代码:

create type testingclob as object (
  member_value number,
  constructor function testingclob(
    i_aclob    clob
  ) return self as result
);
/
create type body testingclob as
  constructor function testingclob(
    i_aclob    clob
  ) return self as result
  is
  begin
    member_value := 0;
    return;
  end;
end;
/
declare 
   l_test testingclob;
begin

   l_test := new testingclob('some text');
end;
但是我得到了错误

ORA-06550: line 5, column 18:
PLS-00307: too many declarations of 'TESTINGCLOB' match this call
ORA-06550: line 5, column 4:

这一类型的编辑工作做得很好。但是,我似乎无法使用构造函数。有人知道我做错了什么吗?

参数
'some text'
应该声明为clob

declare 
   l_param clob;
   l_test testingclob;
begin
   l_param:= 'some text';
   l_test := new testingclob(l_param);
end; 
默认情况下,系统提供一个默认构造函数,该构造函数接受与每个属性对应的参数,请参阅“定义对象构造函数”一章。因此,无法确定构造函数,因为它们都未命中输入参数varchar2

试一试


这是您的默认构造函数。

与问题无关,但是您可能在构造函数库中缺少了一个
return
,无法找到答案-请进一步告知我,您的语句系统提供了一个默认构造函数,该构造函数接受与每个属性对应的参数。我添加了一个指向oracle文档的链接,希望现在已经清楚:-)
begin
   l_test := new testingclob(1);
end;