summaryrefslogtreecommitdiff
path: root/src/include/access/hash.h
diff options
context:
space:
mode:
authorTom Lane2017-06-21 19:18:54 +0000
committerTom Lane2017-06-21 19:19:25 +0000
commitc7b8998ebbf310a156aa38022555a24d98fdbfb4 (patch)
treee85979fb1213a731b7b557f8a830df541f26b135 /src/include/access/hash.h
parentf669c09989bda894d6ba01634ccb229f0687c08a (diff)
Phase 2 of pgindent updates.
Change pg_bsd_indent to follow upstream rules for placement of comments to the right of code, and remove pgindent hack that caused comments following #endif to not obey the general rule. Commit e3860ffa4dd0dad0dd9eea4be9cc1412373a8c89 wasn't actually using the published version of pg_bsd_indent, but a hacked-up version that tried to minimize the amount of movement of comments to the right of code. The situation of interest is where such a comment has to be moved to the right of its default placement at column 33 because there's code there. BSD indent has always moved right in units of tab stops in such cases --- but in the previous incarnation, indent was working in 8-space tab stops, while now it knows we use 4-space tabs. So the net result is that in about half the cases, such comments are placed one tab stop left of before. This is better all around: it leaves more room on the line for comment text, and it means that in such cases the comment uniformly starts at the next 4-space tab stop after the code, rather than sometimes one and sometimes two tabs after. Also, ensure that comments following #endif are indented the same as comments following other preprocessor commands such as #else. That inconsistency turns out to have been self-inflicted damage from a poorly-thought-through post-indent "fixup" in pgindent. This patch is much less interesting than the first round of indent changes, but also bulkier, so I thought it best to separate the effects. Discussion: https://postgr.es/m/[email protected] Discussion: https://postgr.es/m/[email protected]
Diffstat (limited to 'src/include/access/hash.h')
-rw-r--r--src/include/access/hash.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/include/access/hash.h b/src/include/access/hash.h
index 9e8c44bfd3f..fec6e6e9a65 100644
--- a/src/include/access/hash.h
+++ b/src/include/access/hash.h
@@ -145,8 +145,7 @@ typedef struct HashScanOpaqueData
*/
bool hashso_buc_split;
/* info about killed items if any (killedItems is NULL if never used) */
- HashScanPosItem *killedItems; /* tids and offset numbers of killed
- * items */
+ HashScanPosItem *killedItems; /* tids and offset numbers of killed items */
int numKilled; /* number of currently stored items */
} HashScanOpaqueData;
@@ -218,8 +217,8 @@ typedef struct HashMetaPageData
uint32 hashm_firstfree; /* lowest-number free ovflpage (bit#) */
uint32 hashm_nmaps; /* number of bitmap pages */
RegProcedure hashm_procid; /* hash procedure id from pg_proc */
- uint32 hashm_spares[HASH_MAX_SPLITPOINTS]; /* spare pages before
- * each splitpoint */
+ uint32 hashm_spares[HASH_MAX_SPLITPOINTS]; /* spare pages before each
+ * splitpoint */
BlockNumber hashm_mapp[HASH_MAX_BITMAPS]; /* blknos of ovfl bitmaps */
} HashMetaPageData;
@@ -242,7 +241,7 @@ typedef HashMetaPageData *HashMetaPage;
/*
* Constants
*/
-#define BYTE_TO_BIT 3 /* 2^3 bits/byte */
+#define BYTE_TO_BIT 3 /* 2^3 bits/byte */
#define ALL_SET ((uint32) ~0)
/*
@@ -423,4 +422,4 @@ extern void hashbucketcleanup(Relation rel, Bucket cur_bucket,
bool bucket_has_garbage,
IndexBulkDeleteCallback callback, void *callback_state);
-#endif /* HASH_H */
+#endif /* HASH_H */