CREATE OR REPLACE FUNCTION Test_Param_Insert_Data(p_schema_table text, p_dblinkcon text) RETURNS void AS $$
declare
rec p_schema_table;
BEGIN
....
如何使用函数参数 p_schema_table 作为 composite_type_name ,例如 rec public.customer .
我测试了创建函数,但错误返回
错误:类型“p_schema_table”不存在
为什么plpgsql语言不明白 p_schema_table 正在传递函数参数,它应该对表名称如 public.customer
1 回答
您不能声明变量,哪个类型作为参数传递 . 在这种情况下,您应该使用RECORD类型声明它 .