From f3c67aad433484cab9c997a99965992c0ffbdbe5 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Thu, 28 May 2015 11:24:37 -0400 Subject: Fix pg_get_functiondef() to print a function's LEAKPROOF property. Seems to have been an oversight in the original leakproofness patch. Per report and patch from Jeevan Chalke. In passing, prettify some awkward leakproof-related code in AlterFunction. --- src/backend/utils/adt/ruleutils.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/backend/utils/adt/ruleutils.c') diff --git a/src/backend/utils/adt/ruleutils.c b/src/backend/utils/adt/ruleutils.c index 4df1105e02b..8258463a104 100644 --- a/src/backend/utils/adt/ruleutils.c +++ b/src/backend/utils/adt/ruleutils.c @@ -1769,6 +1769,8 @@ pg_get_functiondef(PG_FUNCTION_ARGS) appendStringInfoString(&buf, " STRICT"); if (proc->prosecdef) appendStringInfoString(&buf, " SECURITY DEFINER"); + if (proc->proleakproof) + appendStringInfoString(&buf, " LEAKPROOF"); /* This code for the default cost and rows should match functioncmds.c */ if (proc->prolang == INTERNALlanguageId || -- cgit v1.2.3