summaryrefslogtreecommitdiff
path: root/src/backend/utils/cache/lsyscache.c
diff options
context:
space:
mode:
authorPeter Eisentraut2018-03-02 13:57:38 +0000
committerPeter Eisentraut2018-03-02 18:48:33 +0000
commitfd1a421fe66173fb9b85d3fe150afde8e812cbe4 (patch)
tree24c80c87337ec2d1bb46ee8463207d0cfff5ffc3 /src/backend/utils/cache/lsyscache.c
parent1733460f0205fc6d6bbe4c14911049a918c6e073 (diff)
Add prokind column, replacing proisagg and proiswindow
The new column distinguishes normal functions, procedures, aggregates, and window functions. This replaces the existing columns proisagg and proiswindow, and replaces the convention that procedures are indicated by prorettype == 0. Also change prorettype to be VOIDOID for procedures. Reviewed-by: Tom Lane <[email protected]> Reviewed-by: Michael Paquier <[email protected]>
Diffstat (limited to 'src/backend/utils/cache/lsyscache.c')
-rw-r--r--src/backend/utils/cache/lsyscache.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/backend/utils/cache/lsyscache.c b/src/backend/utils/cache/lsyscache.c
index 51b6b4f7bbe..bba595ad1da 100644
--- a/src/backend/utils/cache/lsyscache.c
+++ b/src/backend/utils/cache/lsyscache.c
@@ -1600,20 +1600,20 @@ func_parallel(Oid funcid)
}
/*
- * get_func_isagg
- * Given procedure id, return the function's proisagg field.
+ * get_func_prokind
+ * Given procedure id, return the routine kind.
*/
-bool
-get_func_isagg(Oid funcid)
+char
+get_func_prokind(Oid funcid)
{
HeapTuple tp;
- bool result;
+ char result;
tp = SearchSysCache1(PROCOID, ObjectIdGetDatum(funcid));
if (!HeapTupleIsValid(tp))
elog(ERROR, "cache lookup failed for function %u", funcid);
- result = ((Form_pg_proc) GETSTRUCT(tp))->proisagg;
+ result = ((Form_pg_proc) GETSTRUCT(tp))->prokind;
ReleaseSysCache(tp);
return result;
}