1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-13 07:41:39 +03:00

Preventive maintenance in advance of pgindent run.

Reformat various places in which pgindent will make a mess, and
fix a few small violations of coding style that I happened to notice
while perusing the diffs from a pgindent dry run.

There is one actual bug fix here: the need-to-enlarge-the-buffer code
path in icu_convert_case was obviously broken.  Perhaps it's unreachable
in our usage?  Or maybe this is just sadly undertested.
This commit is contained in:
Tom Lane
2017-05-16 20:36:35 -04:00
parent ddd243584a
commit c079673dcb
20 changed files with 105 additions and 79 deletions

View File

@ -183,9 +183,11 @@ gbt_num_union(GBT_NUMKEY *out, const GistEntryVector *entryvec, const gbtree_nin
cur = (GBT_NUMKEY *) DatumGetPointer((entryvec->vector[i].key));
c.lower = &cur[0];
c.upper = &cur[tinfo->size];
if ((*tinfo->f_gt) (o.lower, c.lower, flinfo)) /* out->lower > cur->lower */
/* if out->lower > cur->lower, adopt cur as lower */
if ((*tinfo->f_gt) (o.lower, c.lower, flinfo))
memcpy((void *) o.lower, (void *) c.lower, tinfo->size);
if ((*tinfo->f_lt) (o.upper, c.upper, flinfo)) /* out->upper < cur->upper */
/* if out->upper < cur->upper, adopt cur as upper */
if ((*tinfo->f_lt) (o.upper, c.upper, flinfo))
memcpy((void *) o.upper, (void *) c.upper, tinfo->size);
}
@ -274,7 +276,8 @@ gbt_num_consistent(const GBT_NUMKEY_R *key,
if (is_leaf)
retval = (*tinfo->f_eq) (query, key->lower, flinfo);
else
retval = ((*tinfo->f_le) (key->lower, query, flinfo) && (*tinfo->f_le) (query, key->upper, flinfo)) ? true : false;
retval = ((*tinfo->f_le) (key->lower, query, flinfo) &&
(*tinfo->f_le) (query, key->upper, flinfo));
break;
case BTGreaterStrategyNumber:
if (is_leaf)
@ -287,7 +290,7 @@ gbt_num_consistent(const GBT_NUMKEY_R *key,
break;
case BtreeGistNotEqualStrategyNumber:
retval = (!((*tinfo->f_eq) (query, key->lower, flinfo) &&
(*tinfo->f_eq) (query, key->upper, flinfo))) ? true : false;
(*tinfo->f_eq) (query, key->upper, flinfo)));
break;
default:
retval = false;