mirror of
https://github.com/postgres/postgres.git
synced 2025-11-19 13:42:17 +03:00
Phase 3 of pgindent updates.
Don't move parenthesized lines to the left, even if that means they flow past the right margin. By default, BSD indent lines up statement continuation lines that are within parentheses so that they start just to the right of the preceding left parenthesis. However, traditionally, if that resulted in the continuation line extending to the right of the desired right margin, then indent would push it left just far enough to not overrun the margin, if it could do so without making the continuation line start to the left of the current statement indent. That makes for a weird mix of indentations unless one has been completely rigid about never violating the 80-column limit. This behavior has been pretty universally panned by Postgres developers. Hence, disable it with indent's new -lpl switch, so that parenthesized lines are always lined up with the preceding left paren. 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
This commit is contained in:
@@ -81,7 +81,7 @@ typedef struct
|
||||
} DECountItem;
|
||||
|
||||
static void compute_array_stats(VacAttrStats *stats,
|
||||
AnalyzeAttrFetchFunc fetchfunc, int samplerows, double totalrows);
|
||||
AnalyzeAttrFetchFunc fetchfunc, int samplerows, double totalrows);
|
||||
static void prune_element_hashtable(HTAB *elements_tab, int b_current);
|
||||
static uint32 element_hash(const void *key, Size keysize);
|
||||
static int element_match(const void *key1, const void *key2, Size keysize);
|
||||
@@ -285,7 +285,7 @@ compute_array_stats(VacAttrStats *stats, AnalyzeAttrFetchFunc fetchfunc,
|
||||
elements_tab = hash_create("Analyzed elements table",
|
||||
num_mcelem,
|
||||
&elem_hash_ctl,
|
||||
HASH_ELEM | HASH_FUNCTION | HASH_COMPARE | HASH_CONTEXT);
|
||||
HASH_ELEM | HASH_FUNCTION | HASH_COMPARE | HASH_CONTEXT);
|
||||
|
||||
/* hashtable for array distinct elements counts */
|
||||
MemSet(&count_hash_ctl, 0, sizeof(count_hash_ctl));
|
||||
|
||||
Reference in New Issue
Block a user