Skip to content

Commit 6a04d34

Browse files
committed
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
1 parent 0ae2dc4 commit 6a04d34

File tree

14 files changed

+14
-4
lines changed

14 files changed

+14
-4
lines changed

contrib/pageinspect/hashfuncs.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#include "catalog/pg_am.h"
1919
#include "funcapi.h"
2020
#include "miscadmin.h"
21+
#include "utils/array.h"
2122
#include "utils/builtins.h"
2223
#include "utils/rel.h"
2324

src/backend/executor/execExpr.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
#include "nodes/nodeFuncs.h"
4343
#include "optimizer/optimizer.h"
4444
#include "pgstat.h"
45+
#include "utils/array.h"
4546
#include "utils/builtins.h"
4647
#include "utils/datum.h"
4748
#include "utils/lsyscache.h"

src/backend/executor/execExprInterp.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@
6262
#include "executor/execExpr.h"
6363
#include "executor/nodeSubplan.h"
6464
#include "funcapi.h"
65+
#include "utils/array.h"
6566
#include "utils/memutils.h"
6667
#include "miscadmin.h"
6768
#include "nodes/nodeFuncs.h"

src/backend/executor/execTuples.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@
6565
#include "nodes/nodeFuncs.h"
6666
#include "storage/bufmgr.h"
6767
#include "utils/builtins.h"
68+
#include "utils/expandeddatum.h"
6869
#include "utils/lsyscache.h"
6970
#include "utils/typcache.h"
7071

src/backend/executor/nodeAgg.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,7 @@
231231
#include "parser/parse_coerce.h"
232232
#include "utils/acl.h"
233233
#include "utils/builtins.h"
234+
#include "utils/expandeddatum.h"
234235
#include "utils/lsyscache.h"
235236
#include "utils/memutils.h"
236237
#include "utils/syscache.h"

src/backend/executor/nodeWindowAgg.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
#include "parser/parse_coerce.h"
4747
#include "utils/acl.h"
4848
#include "utils/builtins.h"
49+
#include "utils/expandeddatum.h"
4950
#include "utils/datum.h"
5051
#include "utils/lsyscache.h"
5152
#include "utils/memutils.h"

src/backend/partitioning/partprune.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
#include "partitioning/partbounds.h"
5454
#include "partitioning/partprune.h"
5555
#include "rewrite/rewriteManip.h"
56+
#include "utils/array.h"
5657
#include "utils/lsyscache.h"
5758

5859

src/backend/statistics/extended_stats.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
#include "postmaster/autovacuum.h"
3232
#include "statistics/extended_stats_internal.h"
3333
#include "statistics/statistics.h"
34+
#include "utils/array.h"
3435
#include "utils/builtins.h"
3536
#include "utils/fmgroids.h"
3637
#include "utils/lsyscache.h"

src/backend/statistics/mcv.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
#include "optimizer/clauses.h"
2727
#include "statistics/extended_stats_internal.h"
2828
#include "statistics/statistics.h"
29+
#include "utils/array.h"
2930
#include "utils/builtins.h"
3031
#include "utils/bytea.h"
3132
#include "utils/fmgroids.h"

src/backend/utils/adt/acl.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
#include "funcapi.h"
3131
#include "miscadmin.h"
3232
#include "utils/acl.h"
33+
#include "utils/array.h"
3334
#include "utils/builtins.h"
3435
#include "utils/catcache.h"
3536
#include "utils/hashutils.h"

src/backend/utils/adt/tsvector_op.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#include "miscadmin.h"
2626
#include "parser/parse_coerce.h"
2727
#include "tsearch/ts_utils.h"
28+
#include "utils/array.h"
2829
#include "utils/builtins.h"
2930
#include "utils/lsyscache.h"
3031
#include "utils/regproc.h"

src/include/catalog/objectaddress.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ extern char *getObjectTypeDescription(const ObjectAddress *object);
7777
extern char *getObjectIdentity(const ObjectAddress *address);
7878
extern char *getObjectIdentityParts(const ObjectAddress *address,
7979
List **objname, List **objargs);
80-
extern ArrayType *strlist_to_textarray(List *list);
80+
extern struct ArrayType *strlist_to_textarray(List *list);
8181

8282
extern ObjectType get_relkind_objtype(char relkind);
8383

src/include/utils/acl.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
#include "access/htup.h"
3636
#include "nodes/parsenodes.h"
3737
#include "parser/parse_node.h"
38-
#include "utils/array.h"
3938
#include "utils/snapshot.h"
4039

4140

@@ -104,7 +103,7 @@ typedef struct AclItem
104103
/*
105104
* Acl a one-dimensional array of AclItem
106105
*/
107-
typedef ArrayType Acl;
106+
typedef struct ArrayType Acl;
108107

109108
#define ACL_NUM(ACL) (ARR_DIMS(ACL)[0])
110109
#define ACL_DAT(ACL) ((AclItem *) ARR_DATA_PTR(ACL))

src/include/utils/array.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ struct ExprContext;
7777
* CAUTION: if you change the header for ordinary arrays you will also
7878
* need to change the headers for oidvector and int2vector!
7979
*/
80-
typedef struct
80+
typedef struct ArrayType
8181
{
8282
int32 vl_len_; /* varlena header (do not touch directly!) */
8383
int ndim; /* # of dimensions */

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy