aboutsummaryrefslogtreecommitdiff
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
commitd4a9f5519d300aeae813a872b3c9874a7e02564b (patch)
tree551eb42aa7a5bb134c51a1933f1b0cd1e50ccfb1 /src/backend/utils/adt/ruleutils.c
parent269cb4fbcad116d3ec497326f166b6690a6ffbd5 (diff)
downloadpostgresql-d4a9f5519d300aeae813a872b3c9874a7e02564b.tar.gz
postgresql-d4a9f5519d300aeae813a872b3c9874a7e02564b.zip
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 96797672396..6400fa0de3d 100644
--- a/src/backend/utils/adt/ruleutils.c
+++ b/src/backend/utils/adt/ruleutils.c
@@ -1974,6 +1974,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 ||