There is a useful function in PostgreSQL 9.5 called aclexplode()
but I can't seem to find any official documentation on it.
Should I avoid using it? Is it technically an unstable API?
There is a useful function in PostgreSQL 9.5 called aclexplode()
but I can't seem to find any official documentation on it.
Should I avoid using it? Is it technically an unstable API?
Yes, you can rely on it. This function is finally documented in upcoming PostgreSQL 12 (commit).
aclexplode
returns anaclitem
array as a set rows. Output columns are grantoroid
, granteeoid
(0
forPUBLIC
), granted privilege astext
(SELECT
, ...) and whether the prilivege is grantable asboolean
.makeaclitem
performs the inverse operation.