aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2017-01-24 10:20:02 -0500
committerRobert Haas <rhaas@postgresql.org>2017-01-24 10:20:02 -0500
commit27cdb3414b3fb4c8fcc069572568390450bb04c9 (patch)
tree3a9dace39830062e588aad7d2062171bdec6f343 /src/include
parent96e0ccc2b589eda26585ed2a8dabf34b16747c1a (diff)
downloadpostgresql-27cdb3414b3fb4c8fcc069572568390450bb04c9.tar.gz
postgresql-27cdb3414b3fb4c8fcc069572568390450bb04c9.zip
Reindent table partitioning code.
We've accumulated quite a bit of stuff with which pgindent is not quite happy in this code; clean it up to provide a less-annoying base for future pgindent runs.
Diffstat (limited to 'src/include')
-rw-r--r--src/include/catalog/heap.h12
-rw-r--r--src/include/catalog/indexing.h2
-rw-r--r--src/include/catalog/partition.h28
-rw-r--r--src/include/catalog/pg_class.h2
-rw-r--r--src/include/catalog/pg_proc.h2
-rw-r--r--src/include/commands/defrem.h2
-rw-r--r--src/include/nodes/parsenodes.h20
-rw-r--r--src/include/utils/rel.h10
8 files changed, 39 insertions, 39 deletions
diff --git a/src/include/catalog/heap.h b/src/include/catalog/heap.h
index 553958f4d27..1187797fd9e 100644
--- a/src/include/catalog/heap.h
+++ b/src/include/catalog/heap.h
@@ -136,12 +136,12 @@ extern void CheckAttributeType(const char *attname,
/* pg_partitioned_table catalog manipulation functions */
extern void StorePartitionKey(Relation rel,
- char strategy,
- int16 partnatts,
- AttrNumber *partattrs,
- List *partexprs,
- Oid *partopclass,
- Oid *partcollation);
+ char strategy,
+ int16 partnatts,
+ AttrNumber *partattrs,
+ List *partexprs,
+ Oid *partopclass,
+ Oid *partcollation);
extern void RemovePartitionKeyByRelId(Oid relid);
extern void StorePartitionBound(Relation rel, Relation parent, Node *bound);
diff --git a/src/include/catalog/indexing.h b/src/include/catalog/indexing.h
index 45605a0dfda..a3635a4d056 100644
--- a/src/include/catalog/indexing.h
+++ b/src/include/catalog/indexing.h
@@ -323,7 +323,7 @@ DECLARE_UNIQUE_INDEX(pg_replication_origin_roname_index, 6002, on pg_replication
#define ReplicationOriginNameIndex 6002
DECLARE_UNIQUE_INDEX(pg_partitioned_table_partrelid_index, 3351, on pg_partitioned_table using btree(partrelid oid_ops));
-#define PartitionedRelidIndexId 3351
+#define PartitionedRelidIndexId 3351
DECLARE_UNIQUE_INDEX(pg_publication_oid_index, 6110, on pg_publication using btree(oid oid_ops));
#define PublicationObjectIndexId 6110
diff --git a/src/include/catalog/partition.h b/src/include/catalog/partition.h
index df7dcce3312..93cb1686bd6 100644
--- a/src/include/catalog/partition.h
+++ b/src/include/catalog/partition.h
@@ -32,9 +32,9 @@ typedef struct PartitionBoundInfoData *PartitionBoundInfo;
*/
typedef struct PartitionDescData
{
- int nparts; /* Number of partitions */
- Oid *oids; /* OIDs of partitions */
- PartitionBoundInfo boundinfo; /* collection of partition bounds */
+ int nparts; /* Number of partitions */
+ Oid *oids; /* OIDs of partitions */
+ PartitionBoundInfo boundinfo; /* collection of partition bounds */
} PartitionDescData;
typedef struct PartitionDescData *PartitionDesc;
@@ -59,13 +59,13 @@ typedef struct PartitionDescData *PartitionDesc;
*/
typedef struct PartitionDispatchData
{
- Relation reldesc;
- PartitionKey key;
- List *keystate; /* list of ExprState */
- PartitionDesc partdesc;
- TupleTableSlot *tupslot;
- TupleConversionMap *tupmap;
- int *indexes;
+ Relation reldesc;
+ PartitionKey key;
+ List *keystate; /* list of ExprState */
+ PartitionDesc partdesc;
+ TupleTableSlot *tupslot;
+ TupleConversionMap *tupmap;
+ int *indexes;
} PartitionDispatchData;
typedef struct PartitionDispatchData *PartitionDispatch;
@@ -75,7 +75,7 @@ extern bool partition_bounds_equal(PartitionKey key,
PartitionBoundInfo p1, PartitionBoundInfo p2);
extern void check_new_partition_bound(char *relname, Relation parent, Node *bound);
-extern Oid get_partition_parent(Oid relid);
+extern Oid get_partition_parent(Oid relid);
extern List *get_qual_from_partbound(Relation rel, Relation parent, Node *bound);
extern List *map_partition_varattnos(List *expr, int target_varno,
Relation partrel, Relation parent);
@@ -86,7 +86,7 @@ extern PartitionDispatch *RelationGetPartitionDispatchInfo(Relation rel,
int lockmode, int *num_parted,
List **leaf_part_oids);
extern int get_partition_for_tuple(PartitionDispatch *pd,
- TupleTableSlot *slot,
- EState *estate,
- Oid *failed_at);
+ TupleTableSlot *slot,
+ EState *estate,
+ Oid *failed_at);
#endif /* PARTITION_H */
diff --git a/src/include/catalog/pg_class.h b/src/include/catalog/pg_class.h
index d1fa5182eac..3f96611f742 100644
--- a/src/include/catalog/pg_class.h
+++ b/src/include/catalog/pg_class.h
@@ -70,7 +70,7 @@ CATALOG(pg_class,1259) BKI_BOOTSTRAP BKI_ROWTYPE_OID(83) BKI_SCHEMA_MACRO
* not */
bool relispopulated; /* matview currently holds query results */
char relreplident; /* see REPLICA_IDENTITY_xxx constants */
- bool relispartition; /* is relation a partition? */
+ bool relispartition; /* is relation a partition? */
TransactionId relfrozenxid; /* all Xids < this are frozen in this rel */
TransactionId relminmxid; /* all multixacts in this rel are >= this.
* this is really a MultiXactId */
diff --git a/src/include/catalog/pg_proc.h b/src/include/catalog/pg_proc.h
index ab127616437..c1f492b3966 100644
--- a/src/include/catalog/pg_proc.h
+++ b/src/include/catalog/pg_proc.h
@@ -1982,7 +1982,7 @@ DATA(insert OID = 1642 ( pg_get_userbyid PGNSP PGUID 12 1 0 0 0 f f f f t f
DESCR("role name by OID (with fallback)");
DATA(insert OID = 1643 ( pg_get_indexdef PGNSP PGUID 12 1 0 0 0 f f f f t f s s 1 0 25 "26" _null_ _null_ _null_ _null_ _null_ pg_get_indexdef _null_ _null_ _null_ ));
DESCR("index description");
-DATA(insert OID = 3352 ( pg_get_partkeydef PGNSP PGUID 12 1 0 0 0 f f f f t f s s 1 0 25 "26" _null_ _null_ _null_ _null_ _null_ pg_get_partkeydef _null_ _null_ _null_ ));
+DATA(insert OID = 3352 ( pg_get_partkeydef PGNSP PGUID 12 1 0 0 0 f f f f t f s s 1 0 25 "26" _null_ _null_ _null_ _null_ _null_ pg_get_partkeydef _null_ _null_ _null_ ));
DESCR("partition key description");
DATA(insert OID = 1662 ( pg_get_triggerdef PGNSP PGUID 12 1 0 0 0 f f f f t f s s 1 0 25 "26" _null_ _null_ _null_ _null_ _null_ pg_get_triggerdef _null_ _null_ _null_ ));
DESCR("trigger description");
diff --git a/src/include/commands/defrem.h b/src/include/commands/defrem.h
index 558a91d06f4..8740cee9440 100644
--- a/src/include/commands/defrem.h
+++ b/src/include/commands/defrem.h
@@ -42,7 +42,7 @@ extern bool CheckIndexCompatible(Oid oldId,
List *attributeList,
List *exclusionOpNames);
extern Oid GetDefaultOpClass(Oid type_id, Oid am_id);
-extern Oid ResolveOpClass(List *opclass, Oid attrType,
+extern Oid ResolveOpClass(List *opclass, Oid attrType,
char *accessMethodName, Oid accessMethodId);
/* commands/functioncmds.c */
diff --git a/src/include/nodes/parsenodes.h b/src/include/nodes/parsenodes.h
index aad4699f485..07a84361432 100644
--- a/src/include/nodes/parsenodes.h
+++ b/src/include/nodes/parsenodes.h
@@ -715,11 +715,11 @@ typedef struct XmlSerialize
typedef struct PartitionElem
{
NodeTag type;
- char *name; /* name of column to partition on, or NULL */
- Node *expr; /* expression to partition on, or NULL */
- List *collation; /* name of collation; NIL = default */
- List *opclass; /* name of desired opclass; NIL = default */
- int location; /* token location, or -1 if unknown */
+ char *name; /* name of column to partition on, or NULL */
+ Node *expr; /* expression to partition on, or NULL */
+ List *collation; /* name of collation; NIL = default */
+ List *opclass; /* name of desired opclass; NIL = default */
+ int location; /* token location, or -1 if unknown */
} PartitionElem;
/*
@@ -728,9 +728,9 @@ typedef struct PartitionElem
typedef struct PartitionSpec
{
NodeTag type;
- char *strategy; /* partitioning strategy ('list' or 'range') */
- List *partParams; /* List of PartitionElems */
- int location; /* token location, or -1 if unknown */
+ char *strategy; /* partitioning strategy ('list' or 'range') */
+ List *partParams; /* List of PartitionElems */
+ int location; /* token location, or -1 if unknown */
} PartitionSpec;
#define PARTITION_STRATEGY_LIST 'l'
@@ -749,8 +749,8 @@ typedef struct PartitionBoundSpec
List *listdatums;
/*
- * Range partition lower and upper bounds; each member of the lists
- * is a PartitionRangeDatum (see below).
+ * Range partition lower and upper bounds; each member of the lists is a
+ * PartitionRangeDatum (see below).
*/
List *lowerdatums;
List *upperdatums;
diff --git a/src/include/utils/rel.h b/src/include/utils/rel.h
index a1750accc23..a617a7cf566 100644
--- a/src/include/utils/rel.h
+++ b/src/include/utils/rel.h
@@ -124,11 +124,11 @@ typedef struct RelationData
List *rd_fkeylist; /* list of ForeignKeyCacheInfo (see below) */
bool rd_fkeyvalid; /* true if list has been computed */
- MemoryContext rd_partkeycxt; /* private memory cxt for the below */
- struct PartitionKeyData *rd_partkey; /* partition key, or NULL */
- MemoryContext rd_pdcxt; /* private context for partdesc */
- struct PartitionDescData *rd_partdesc; /* partitions, or NULL */
- List *rd_partcheck; /* partition CHECK quals */
+ MemoryContext rd_partkeycxt; /* private memory cxt for the below */
+ struct PartitionKeyData *rd_partkey; /* partition key, or NULL */
+ MemoryContext rd_pdcxt; /* private context for partdesc */
+ struct PartitionDescData *rd_partdesc; /* partitions, or NULL */
+ List *rd_partcheck; /* partition CHECK quals */
/* data managed by RelationGetIndexList: */
List *rd_indexlist; /* list of OIDs of indexes on relation */