!6214 参考gaussdb,完善out_param_override打开时对call函数的约束的提示打印信息

Merge pull request !6214 from wangfeihuo/override
This commit is contained in:
opengauss_bot
2024-09-04 09:34:49 +00:00
committed by Gitee
3 changed files with 16 additions and 1 deletions

View File

@ -7249,7 +7249,9 @@ make_callfunc_stmt(const char *sqlstart, int location, bool is_assign, bool eate
InsertErrorMessage(message, plpgsql_yylloc);
ereport(errstate,
(errcode(ERRCODE_DUPLICATE_FUNCTION),
errmsg("function \"%s\" isn't exclusive ", sqlstart)));
errmsg("function \"%s\" isn't exclusive ", sqlstart),
errdetail("The overload function must be package function or function with PACKAGE keyword.And do not mix overload functions of O style and PG style."),
errcause("The overload function must be package function.")));
}
}

View File

@ -327,6 +327,14 @@ drop view v1;
drop package pac_test_1;
NOTICE: drop cascades to function out_param_func_overload.f_test_1(integer,integer,integer)
drop table t1;
create or replace procedure proc_test is
begin
perform count(1);
end;
/
ERROR: function "count" isn't exclusive
DETAIL: The overload function must be package function or function with PACKAGE keyword.And do not mix overload functions of O style and PG style.
CONTEXT: compilation of PL/pgSQL function "proc_test" near line 1
--clean
reset behavior_compat_options;
drop schema out_param_func_overload cascade;

View File

@ -262,6 +262,11 @@ drop view v1;
drop package pac_test_1;
drop table t1;
create or replace procedure proc_test is
begin
perform count(1);
end;
/
--clean
reset behavior_compat_options;