Don't include utils/array.h from acl.h.
For most uses of acl.h the details of how "Acl" internally looks like are irrelevant. It might make sense to move a lot of the implementation details into a separate header at a later point. The main motivation of this change is to avoid including fmgr.h (via array.h, which needs it for exposed structs) in a lot of files that otherwise don't need it. A subsequent commit will remove the fmgr.h include from a lot of files. Directly include utils/array.h and utils/expandeddatum.h from the files that need them, but previously included them indirectly, via acl.h. Author: Andres Freund Discussion: https://postgr.es/m/20190803193733.g3l3x3o42uv4qj7l@alap3.anarazel.de
This commit is contained in:
parent
0ae2dc4db2
commit
6a04d345fd
@ -18,6 +18,7 @@
|
||||
#include "catalog/pg_am.h"
|
||||
#include "funcapi.h"
|
||||
#include "miscadmin.h"
|
||||
#include "utils/array.h"
|
||||
#include "utils/builtins.h"
|
||||
#include "utils/rel.h"
|
||||
|
||||
|
@ -42,6 +42,7 @@
|
||||
#include "nodes/nodeFuncs.h"
|
||||
#include "optimizer/optimizer.h"
|
||||
#include "pgstat.h"
|
||||
#include "utils/array.h"
|
||||
#include "utils/builtins.h"
|
||||
#include "utils/datum.h"
|
||||
#include "utils/lsyscache.h"
|
||||
|
@ -62,6 +62,7 @@
|
||||
#include "executor/execExpr.h"
|
||||
#include "executor/nodeSubplan.h"
|
||||
#include "funcapi.h"
|
||||
#include "utils/array.h"
|
||||
#include "utils/memutils.h"
|
||||
#include "miscadmin.h"
|
||||
#include "nodes/nodeFuncs.h"
|
||||
|
@ -65,6 +65,7 @@
|
||||
#include "nodes/nodeFuncs.h"
|
||||
#include "storage/bufmgr.h"
|
||||
#include "utils/builtins.h"
|
||||
#include "utils/expandeddatum.h"
|
||||
#include "utils/lsyscache.h"
|
||||
#include "utils/typcache.h"
|
||||
|
||||
|
@ -231,6 +231,7 @@
|
||||
#include "parser/parse_coerce.h"
|
||||
#include "utils/acl.h"
|
||||
#include "utils/builtins.h"
|
||||
#include "utils/expandeddatum.h"
|
||||
#include "utils/lsyscache.h"
|
||||
#include "utils/memutils.h"
|
||||
#include "utils/syscache.h"
|
||||
|
@ -46,6 +46,7 @@
|
||||
#include "parser/parse_coerce.h"
|
||||
#include "utils/acl.h"
|
||||
#include "utils/builtins.h"
|
||||
#include "utils/expandeddatum.h"
|
||||
#include "utils/datum.h"
|
||||
#include "utils/lsyscache.h"
|
||||
#include "utils/memutils.h"
|
||||
|
@ -53,6 +53,7 @@
|
||||
#include "partitioning/partbounds.h"
|
||||
#include "partitioning/partprune.h"
|
||||
#include "rewrite/rewriteManip.h"
|
||||
#include "utils/array.h"
|
||||
#include "utils/lsyscache.h"
|
||||
|
||||
|
||||
|
@ -31,6 +31,7 @@
|
||||
#include "postmaster/autovacuum.h"
|
||||
#include "statistics/extended_stats_internal.h"
|
||||
#include "statistics/statistics.h"
|
||||
#include "utils/array.h"
|
||||
#include "utils/builtins.h"
|
||||
#include "utils/fmgroids.h"
|
||||
#include "utils/lsyscache.h"
|
||||
|
@ -26,6 +26,7 @@
|
||||
#include "optimizer/clauses.h"
|
||||
#include "statistics/extended_stats_internal.h"
|
||||
#include "statistics/statistics.h"
|
||||
#include "utils/array.h"
|
||||
#include "utils/builtins.h"
|
||||
#include "utils/bytea.h"
|
||||
#include "utils/fmgroids.h"
|
||||
|
@ -30,6 +30,7 @@
|
||||
#include "funcapi.h"
|
||||
#include "miscadmin.h"
|
||||
#include "utils/acl.h"
|
||||
#include "utils/array.h"
|
||||
#include "utils/builtins.h"
|
||||
#include "utils/catcache.h"
|
||||
#include "utils/hashutils.h"
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include "miscadmin.h"
|
||||
#include "parser/parse_coerce.h"
|
||||
#include "tsearch/ts_utils.h"
|
||||
#include "utils/array.h"
|
||||
#include "utils/builtins.h"
|
||||
#include "utils/lsyscache.h"
|
||||
#include "utils/regproc.h"
|
||||
|
@ -77,7 +77,7 @@ extern char *getObjectTypeDescription(const ObjectAddress *object);
|
||||
extern char *getObjectIdentity(const ObjectAddress *address);
|
||||
extern char *getObjectIdentityParts(const ObjectAddress *address,
|
||||
List **objname, List **objargs);
|
||||
extern ArrayType *strlist_to_textarray(List *list);
|
||||
extern struct ArrayType *strlist_to_textarray(List *list);
|
||||
|
||||
extern ObjectType get_relkind_objtype(char relkind);
|
||||
|
||||
|
@ -35,7 +35,6 @@
|
||||
#include "access/htup.h"
|
||||
#include "nodes/parsenodes.h"
|
||||
#include "parser/parse_node.h"
|
||||
#include "utils/array.h"
|
||||
#include "utils/snapshot.h"
|
||||
|
||||
|
||||
@ -104,7 +103,7 @@ typedef struct AclItem
|
||||
/*
|
||||
* Acl a one-dimensional array of AclItem
|
||||
*/
|
||||
typedef ArrayType Acl;
|
||||
typedef struct ArrayType Acl;
|
||||
|
||||
#define ACL_NUM(ACL) (ARR_DIMS(ACL)[0])
|
||||
#define ACL_DAT(ACL) ((AclItem *) ARR_DATA_PTR(ACL))
|
||||
|
@ -77,7 +77,7 @@ struct ExprContext;
|
||||
* CAUTION: if you change the header for ordinary arrays you will also
|
||||
* need to change the headers for oidvector and int2vector!
|
||||
*/
|
||||
typedef struct
|
||||
typedef struct ArrayType
|
||||
{
|
||||
int32 vl_len_; /* varlena header (do not touch directly!) */
|
||||
int ndim; /* # of dimensions */
|
||||
|
Loading…
x
Reference in New Issue
Block a user