summaryrefslogtreecommitdiff
path: root/src/include/statistics
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/statistics
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/E1dAmxK-0006EE-1r@gemulon.postgresql.org Discussion: https://postgr.es/m/30527.1495162840@sss.pgh.pa.us
Diffstat (limited to 'src/include/statistics')
-rw-r--r--src/include/statistics/extended_stats_internal.h2
-rw-r--r--src/include/statistics/statistics.h10
2 files changed, 6 insertions, 6 deletions
diff --git a/src/include/statistics/extended_stats_internal.h b/src/include/statistics/extended_stats_internal.h
index dc72e2f4798..738ff3fadc2 100644
--- a/src/include/statistics/extended_stats_internal.h
+++ b/src/include/statistics/extended_stats_internal.h
@@ -66,4 +66,4 @@ extern int multi_sort_compare_dim(int dim, const SortItem *a,
extern int multi_sort_compare_dims(int start, int end, const SortItem *a,
const SortItem *b, MultiSortSupport mss);
-#endif /* EXTENDED_STATS_INTERNAL_H */
+#endif /* EXTENDED_STATS_INTERNAL_H */
diff --git a/src/include/statistics/statistics.h b/src/include/statistics/statistics.h
index 87bf3d82cab..1d68c39df05 100644
--- a/src/include/statistics/statistics.h
+++ b/src/include/statistics/statistics.h
@@ -16,7 +16,7 @@
#include "commands/vacuum.h"
#include "nodes/relation.h"
-#define STATS_MAX_DIMENSIONS 8 /* max number of attributes */
+#define STATS_MAX_DIMENSIONS 8 /* max number of attributes */
/* Multivariate distinct coefficients */
#define STATS_NDISTINCT_MAGIC 0xA352BFA4 /* struct identifier */
@@ -49,8 +49,8 @@ typedef struct MVNDistinct
/* size of the struct excluding the items array */
#define SizeOfMVNDistinct (offsetof(MVNDistinct, nitems) + sizeof(uint32))
-#define STATS_DEPS_MAGIC 0xB4549A2C /* marks serialized bytea */
-#define STATS_DEPS_TYPE_BASIC 1 /* basic dependencies type */
+#define STATS_DEPS_MAGIC 0xB4549A2C /* marks serialized bytea */
+#define STATS_DEPS_TYPE_BASIC 1 /* basic dependencies type */
/*
* Functional dependencies, tracking column-level relationships (values
@@ -60,7 +60,7 @@ typedef struct MVDependency
{
double degree; /* degree of validity (0-1) */
AttrNumber nattributes; /* number of attributes */
- AttrNumber attributes[FLEXIBLE_ARRAY_MEMBER]; /* attribute numbers */
+ AttrNumber attributes[FLEXIBLE_ARRAY_MEMBER]; /* attribute numbers */
} MVDependency;
/* size of the struct excluding the deps array */
@@ -96,4 +96,4 @@ extern bool has_stats_of_kind(List *stats, char requiredkind);
extern StatisticExtInfo *choose_best_statistics(List *stats,
Bitmapset *attnums, char requiredkind);
-#endif /* STATISTICS_H */
+#endif /* STATISTICS_H */