mirror of
https://github.com/postgres/postgres.git
synced 2025-12-12 02:37:31 +03:00
Revert patch --- needs more generalized solution.
> Please find a attached a small patch that adds accessor functions > for "aclitem" so that it is not an opaque datatype. > > I needed these functions to browse aclitems from user land. I can load > them when necessary, but it seems to me that these accessors for a > backend type belong to the backend, so I submit them. > > Fabien Coelho
This commit is contained in:
@@ -581,20 +581,6 @@ SELECT has_table_privilege('regressuser1', 'atest4', 'SELECT WITH GRANT OPTION')
|
||||
t
|
||||
(1 row)
|
||||
|
||||
-- aclitem utils small test
|
||||
SELECT u1.usename AS u1, u2.usename AS u2,
|
||||
aclitem_idtype(c.relacl[0]) AS idtype,
|
||||
aclitem_privs(c.relacl[0]) AS privs,
|
||||
aclitem_goptions(c.relacl[0]) AS goptions
|
||||
FROM pg_class AS c, pg_user AS u1, pg_user AS u2
|
||||
WHERE u1.usesysid = aclitem_grantor(c.relacl[0])
|
||||
AND u2.usesysid = aclitem_grantee(c.relacl[0])
|
||||
AND c.relname LIKE 'atest4';
|
||||
u1 | u2 | idtype | privs | goptions
|
||||
--------------+--------------+--------+-------+----------
|
||||
regressuser1 | regressuser1 | 1 | 127 | 127
|
||||
(1 row)
|
||||
|
||||
-- clean up
|
||||
\c regression
|
||||
DROP FUNCTION testfunc2(int);
|
||||
|
||||
@@ -316,15 +316,6 @@ SELECT has_table_privilege('regressuser3', 'atest4', 'SELECT'); -- false
|
||||
|
||||
SELECT has_table_privilege('regressuser1', 'atest4', 'SELECT WITH GRANT OPTION'); -- true
|
||||
|
||||
-- aclitem utils small test
|
||||
SELECT u1.usename AS u1, u2.usename AS u2,
|
||||
aclitem_idtype(c.relacl[0]) AS idtype,
|
||||
aclitem_privs(c.relacl[0]) AS privs,
|
||||
aclitem_goptions(c.relacl[0]) AS goptions
|
||||
FROM pg_class AS c, pg_user AS u1, pg_user AS u2
|
||||
WHERE u1.usesysid = aclitem_grantor(c.relacl[0])
|
||||
AND u2.usesysid = aclitem_grantee(c.relacl[0])
|
||||
AND c.relname LIKE 'atest4';
|
||||
|
||||
-- clean up
|
||||
|
||||
|
||||
Reference in New Issue
Block a user