summaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/ruleutils.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2015-05-28 11:24:37 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2015-05-28 11:24:37 -0400
commit27bae8d964f7eeb61e7e6e57586e7cb9b571b94c (patch)
treea0c98a8ad8b3bbcb675d4464cc89ed023f22a93d /src/backend/utils/adt/ruleutils.c
parent5c8e43a492c9885ea5d541b8d0d391a871ad8427 (diff)
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.
Diffstat (limited to 'src/backend/utils/adt/ruleutils.c')
-rw-r--r--src/backend/utils/adt/ruleutils.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/backend/utils/adt/ruleutils.c b/src/backend/utils/adt/ruleutils.c
index 578972bba25..da28e59a921 100644
--- a/src/backend/utils/adt/ruleutils.c
+++ b/src/backend/utils/adt/ruleutils.c
@@ -1944,6 +1944,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 ||