mirror of
https://github.com/postgres/postgres.git
synced 2026-03-14 06:32:18 -04:00
There used to be a lot of different *Type and *Kind symbol groups to
address objects within different commands, most of which have been
replaced by ObjectType, starting with
b256f24264. But this conversion was never
done for the ACL commands until now.
This change ends up being just a plain replacement of the types and
symbols, without any code restructuring needed, except deleting some now
redundant code.
Reviewed-by: Michael Paquier <michael.paquier@gmail.com>
Reviewed-by: Stephen Frost <sfrost@snowman.net>
45 lines
1.4 KiB
C
45 lines
1.4 KiB
C
/*-------------------------------------------------------------------------
|
|
*
|
|
* aclchk_internal.h
|
|
*
|
|
* Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
|
|
* Portions Copyright (c) 1994, Regents of the University of California
|
|
*
|
|
* src/include/utils/aclchk_internal.h
|
|
*
|
|
*-------------------------------------------------------------------------
|
|
*/
|
|
#ifndef ACLCHK_INTERNAL_H
|
|
#define ACLCHK_INTERNAL_H
|
|
|
|
#include "nodes/parsenodes.h"
|
|
#include "nodes/pg_list.h"
|
|
|
|
/*
|
|
* The information about one Grant/Revoke statement, in internal format: object
|
|
* and grantees names have been turned into Oids, the privilege list is an
|
|
* AclMode bitmask. If 'privileges' is ACL_NO_RIGHTS (the 0 value) and
|
|
* all_privs is true, 'privileges' will be internally set to the right kind of
|
|
* ACL_ALL_RIGHTS_*, depending on the object type (NB - this will modify the
|
|
* InternalGrant struct!)
|
|
*
|
|
* Note: 'all_privs' and 'privileges' represent object-level privileges only.
|
|
* There might also be column-level privilege specifications, which are
|
|
* represented in col_privs (this is a list of untransformed AccessPriv nodes).
|
|
* Column privileges are only valid for objtype OBJECT_TABLE.
|
|
*/
|
|
typedef struct
|
|
{
|
|
bool is_grant;
|
|
ObjectType objtype;
|
|
List *objects;
|
|
bool all_privs;
|
|
AclMode privileges;
|
|
List *col_privs;
|
|
List *grantees;
|
|
bool grant_option;
|
|
DropBehavior behavior;
|
|
} InternalGrant;
|
|
|
|
|
|
#endif /* ACLCHK_INTERNAL_H */
|