1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-27 12:41:57 +03:00

Clean up newlines following left parentheses

We used to strategically place newlines after some function call left
parentheses to make pgindent move the argument list a few chars to the
left, so that the whole line would fit under 80 chars.  However,
pgindent no longer does that, so the newlines just made the code
vertically longer for no reason.  Remove those newlines, and reflow some
of those lines for some extra naturality.

Reviewed-by: Michael Paquier, Tom Lane
Discussion: https://postgr.es/m/20200129200401.GA6303@alvherre.pgsql
This commit is contained in:
Alvaro Herrera
2020-01-30 13:42:14 -03:00
parent 4e89c79a52
commit c9d2977519
78 changed files with 342 additions and 538 deletions

View File

@ -31,16 +31,16 @@ PG_FUNCTION_INFO_V1(gbt_enum_same);
static bool
gbt_enumgt(const void *a, const void *b, FmgrInfo *flinfo)
{
return DatumGetBool(
CallerFInfoFunctionCall2(enum_gt, flinfo, InvalidOid, ObjectIdGetDatum(*((const Oid *) a)), ObjectIdGetDatum(*((const Oid *) b)))
);
return DatumGetBool(CallerFInfoFunctionCall2(enum_gt, flinfo, InvalidOid,
ObjectIdGetDatum(*((const Oid *) a)),
ObjectIdGetDatum(*((const Oid *) b))));
}
static bool
gbt_enumge(const void *a, const void *b, FmgrInfo *flinfo)
{
return DatumGetBool(
CallerFInfoFunctionCall2(enum_ge, flinfo, InvalidOid, ObjectIdGetDatum(*((const Oid *) a)), ObjectIdGetDatum(*((const Oid *) b)))
);
return DatumGetBool(CallerFInfoFunctionCall2(enum_ge, flinfo, InvalidOid,
ObjectIdGetDatum(*((const Oid *) a)),
ObjectIdGetDatum(*((const Oid *) b))));
}
static bool
gbt_enumeq(const void *a, const void *b, FmgrInfo *flinfo)
@ -50,16 +50,16 @@ gbt_enumeq(const void *a, const void *b, FmgrInfo *flinfo)
static bool
gbt_enumle(const void *a, const void *b, FmgrInfo *flinfo)
{
return DatumGetBool(
CallerFInfoFunctionCall2(enum_le, flinfo, InvalidOid, ObjectIdGetDatum(*((const Oid *) a)), ObjectIdGetDatum(*((const Oid *) b)))
);
return DatumGetBool(CallerFInfoFunctionCall2(enum_le, flinfo, InvalidOid,
ObjectIdGetDatum(*((const Oid *) a)),
ObjectIdGetDatum(*((const Oid *) b))));
}
static bool
gbt_enumlt(const void *a, const void *b, FmgrInfo *flinfo)
{
return DatumGetBool(
CallerFInfoFunctionCall2(enum_lt, flinfo, InvalidOid, ObjectIdGetDatum(*((const Oid *) a)), ObjectIdGetDatum(*((const Oid *) b)))
);
return DatumGetBool(CallerFInfoFunctionCall2(enum_lt, flinfo, InvalidOid,
ObjectIdGetDatum(*((const Oid *) a)),
ObjectIdGetDatum(*((const Oid *) b))));
}
static int
@ -73,14 +73,14 @@ gbt_enumkey_cmp(const void *a, const void *b, FmgrInfo *flinfo)
if (ia->upper == ib->upper)
return 0;
return DatumGetInt32(
CallerFInfoFunctionCall2(enum_cmp, flinfo, InvalidOid, ObjectIdGetDatum(ia->upper), ObjectIdGetDatum(ib->upper))
);
return DatumGetInt32(CallerFInfoFunctionCall2(enum_cmp, flinfo, InvalidOid,
ObjectIdGetDatum(ia->upper),
ObjectIdGetDatum(ib->upper)));
}
return DatumGetInt32(
CallerFInfoFunctionCall2(enum_cmp, flinfo, InvalidOid, ObjectIdGetDatum(ia->lower), ObjectIdGetDatum(ib->lower))
);
return DatumGetInt32(CallerFInfoFunctionCall2(enum_cmp, flinfo, InvalidOid,
ObjectIdGetDatum(ia->lower),
ObjectIdGetDatum(ib->lower)));
}
static const gbtree_ninfo tinfo =
@ -137,9 +137,9 @@ gbt_enum_consistent(PG_FUNCTION_ARGS)
key.lower = (GBT_NUMKEY *) &kkk->lower;
key.upper = (GBT_NUMKEY *) &kkk->upper;
PG_RETURN_BOOL(
gbt_num_consistent(&key, (void *) &query, &strategy, GIST_LEAF(entry), &tinfo, fcinfo->flinfo)
);
PG_RETURN_BOOL(gbt_num_consistent(&key, (void *) &query, &strategy,
GIST_LEAF(entry), &tinfo,
fcinfo->flinfo));
}
Datum
@ -168,11 +168,9 @@ gbt_enum_penalty(PG_FUNCTION_ARGS)
Datum
gbt_enum_picksplit(PG_FUNCTION_ARGS)
{
PG_RETURN_POINTER(gbt_num_picksplit(
(GistEntryVector *) PG_GETARG_POINTER(0),
PG_RETURN_POINTER(gbt_num_picksplit((GistEntryVector *) PG_GETARG_POINTER(0),
(GIST_SPLITVEC *) PG_GETARG_POINTER(1),
&tinfo, fcinfo->flinfo
));
&tinfo, fcinfo->flinfo));
}
Datum