pg函数的参数一种用法
CREATE OR REPLACE FUNCTION "public"."fn_BillsCharge2Account"("aSQlStr" varchar) RETURNS "pg_catalog"."varchar" AS $BODY$BEGIN EXECUTE $1 ; RETURN '1'; --1:成功;0:失败 END$BODY$ LANGUAGE plpgsql VOLATILE COST 100
调用
SELECT * FROM "public"."fn_BillsCharge2Account"('SELECT * FROM "ExpenseManagement"."ExpenseView" where "是否费用成本" is true and "Imported" is true ');
SELECT "public"."fn_BillsCharge2Account"('SELECT * FROM "ExpenseManagement"."ExpenseView" where "是否费用成本" is true and "Imported" is true ');