egdb3_11_7
.permission
Tables
(current)
Columns
Constraints
Relationships
Orphan Tables
Anomalies
Routines
grp_descendants_distance(integer)
Parameters
Name
Type
Mode
integer
IN
id
integer
TABLE
distance
integer
TABLE
Definition
WITH RECURSIVE grp_descendants_distance(id, distance) AS ( SELECT $1, 0 UNION SELECT pgt.id, gdd.distance+1 FROM permission.grp_tree pgt JOIN grp_descendants_distance gdd ON (pgt.parent = gdd.id) ) SELECT * FROM grp_descendants_distance;