1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-29 10:41:53 +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:
Bruce Momjian
2004-05-02 13:38:28 +00:00
parent 7ebd5dafd8
commit a9d3c2cb18
6 changed files with 5 additions and 82 deletions

View File

@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/utils/adt/acl.c,v 1.102 2004/04/26 15:06:48 momjian Exp $
* $PostgreSQL: pgsql/src/backend/utils/adt/acl.c,v 1.103 2004/05/02 13:38:27 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -874,43 +874,6 @@ makeaclitem(PG_FUNCTION_ARGS)
PG_RETURN_ACLITEM_P(aclitem);
}
/* give access to internal data within aclitem
*/
Datum
aclitem_grantee(PG_FUNCTION_ARGS)
{
AclItem * a = PG_GETARG_ACLITEM_P(0);
PG_RETURN_INT32(a->ai_grantee);
}
Datum
aclitem_grantor(PG_FUNCTION_ARGS)
{
AclItem * a = PG_GETARG_ACLITEM_P(0);
PG_RETURN_INT32(a->ai_grantor);
}
Datum
aclitem_idtype(PG_FUNCTION_ARGS)
{
AclItem * a = PG_GETARG_ACLITEM_P(0);
PG_RETURN_INT32(ACLITEM_GET_IDTYPE(*a));
}
Datum
aclitem_privs(PG_FUNCTION_ARGS)
{
AclItem * a = PG_GETARG_ACLITEM_P(0);
PG_RETURN_INT32(ACLITEM_GET_PRIVS(*a));
}
Datum
aclitem_goptions(PG_FUNCTION_ARGS)
{
AclItem * a = PG_GETARG_ACLITEM_P(0);
PG_RETURN_INT32(ACLITEM_GET_GOPTIONS(*a));
}
static AclMode
convert_priv_string(text *priv_type_text)
{