!658 修复创建存储过程时多个参数结合使用导致创建失败的问题
Merge pull request !658 from TotaJ/bugfix/procedure
This commit is contained in:
@ -10319,9 +10319,9 @@ createfunc_opt_list:
|
||||
| createfunc_opt_list createfunc_opt_item { $$ = lappend($1, $2); }
|
||||
;
|
||||
opt_createproc_opt_list:
|
||||
createproc_opt_item
|
||||
opt_createproc_opt_list createproc_opt_item
|
||||
{
|
||||
$$ = list_make1($1);
|
||||
$$ = lappend($1, $2);
|
||||
}
|
||||
| /* EMPTY */
|
||||
{
|
||||
|
||||
@ -742,3 +742,32 @@ CALL PRO_NO_EXP_001_1();
|
||||
|
||||
(1 row)
|
||||
|
||||
create table test_emp_001(name varchar(10));
|
||||
create or replace procedure test_proc_using_001(a int) SHIPPABLE LEAKPROOF CALLED ON NULL INPUT external security invoker cost 0.000056
|
||||
as
|
||||
v_sql varchar2(2000);
|
||||
begin
|
||||
v_sql := 'insert into test_emp_001 values (:v1)';
|
||||
execute immediate v_sql using 'kimy';
|
||||
end;
|
||||
/
|
||||
call test_proc_using_001(1);
|
||||
test_proc_using_001
|
||||
---------------------
|
||||
|
||||
(1 row)
|
||||
|
||||
select * from test_emp_001;
|
||||
name
|
||||
------
|
||||
kimy
|
||||
(1 row)
|
||||
|
||||
select prosecdef,procost,proleakproof,proisstrict,proshippable,prokind from pg_proc where proname='test_proc_using_001';
|
||||
prosecdef | procost | proleakproof | proisstrict | proshippable | prokind
|
||||
-----------+---------+--------------+-------------+--------------+---------
|
||||
f | 5.6e-05 | t | f | t | p
|
||||
(1 row)
|
||||
|
||||
drop table test_emp_001;
|
||||
drop procedure test_proc_using_001;
|
||||
|
||||
@ -584,4 +584,21 @@ END;
|
||||
/
|
||||
|
||||
CALL PRO_NO_EXP_001_1();
|
||||
CALL PRO_NO_EXP_001_1();
|
||||
CALL PRO_NO_EXP_001_1();
|
||||
|
||||
|
||||
create table test_emp_001(name varchar(10));
|
||||
create or replace procedure test_proc_using_001(a int) SHIPPABLE LEAKPROOF CALLED ON NULL INPUT external security invoker cost 0.000056
|
||||
as
|
||||
v_sql varchar2(2000);
|
||||
begin
|
||||
v_sql := 'insert into test_emp_001 values (:v1)';
|
||||
execute immediate v_sql using 'kimy';
|
||||
end;
|
||||
/
|
||||
call test_proc_using_001(1);
|
||||
select * from test_emp_001;
|
||||
select prosecdef,procost,proleakproof,proisstrict,proshippable,prokind from pg_proc where proname='test_proc_using_001';
|
||||
|
||||
drop table test_emp_001;
|
||||
drop procedure test_proc_using_001;
|
||||
|
||||
Reference in New Issue
Block a user