diff options
author | Robert Haas <rhaas@postgresql.org> | 2010-12-13 18:58:31 -0500 |
---|---|---|
committer | Robert Haas <rhaas@postgresql.org> | 2010-12-13 19:15:53 -0500 |
commit | d368e1a2a7afad5a0fc711a2ab70a83c36fa57af (patch) | |
tree | 7536290197c79f079e1a9938a218ac632e34b134 /src/backend/optimizer/util/clauses.c | |
parent | 843a490f0aeccd5b61a30c37d2ffaae26d192329 (diff) | |
download | postgresql-d368e1a2a7afad5a0fc711a2ab70a83c36fa57af.tar.gz postgresql-d368e1a2a7afad5a0fc711a2ab70a83c36fa57af.zip |
Allow plugins to suppress inlining and hook function entry/exit/abort.
This is intended as infrastructure to allow an eventual SE-Linux plugin to
support trusted procedures.
KaiGai Kohei
Diffstat (limited to 'src/backend/optimizer/util/clauses.c')
-rw-r--r-- | src/backend/optimizer/util/clauses.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/backend/optimizer/util/clauses.c b/src/backend/optimizer/util/clauses.c index 80dfaad736f..fa84164b068 100644 --- a/src/backend/optimizer/util/clauses.c +++ b/src/backend/optimizer/util/clauses.c @@ -3726,6 +3726,10 @@ inline_function(Oid funcid, Oid result_type, List *args, if (pg_proc_aclcheck(funcid, GetUserId(), ACL_EXECUTE) != ACLCHECK_OK) return NULL; + /* Check whether a plugin wants to hook function entry/exit */ + if (FmgrHookIsNeeded(funcid)) + return NULL; + /* * Make a temporary memory context, so that we don't leak all the stuff * that parsing might create. @@ -4158,6 +4162,10 @@ inline_set_returning_function(PlannerInfo *root, RangeTblEntry *rte) if (pg_proc_aclcheck(func_oid, GetUserId(), ACL_EXECUTE) != ACLCHECK_OK) return NULL; + /* Check whether a plugin wants to hook function entry/exit */ + if (FmgrHookIsNeeded(func_oid)) + return NULL; + /* * OK, let's take a look at the function's pg_proc entry. */ |