mirror of
https://github.com/postgres/postgres.git
synced 2025-06-17 17:02:08 +03:00
Initial pgindent run for v12.
This is still using the 2.0 version of pg_bsd_indent. I thought it would be good to commit this separately, so as to document the differences between 2.0 and 2.1 behavior. Discussion: https://postgr.es/m/16296.1558103386@sss.pgh.pa.us
This commit is contained in:
@ -1053,8 +1053,8 @@ transformTableLikeClause(CreateStmtContext *cxt, TableLikeClause *table_like_cla
|
||||
InvalidOid, &found_whole_row);
|
||||
|
||||
/*
|
||||
* Prevent this for the same reason as for constraints below.
|
||||
* Note that defaults cannot contain any vars, so it's OK that the
|
||||
* Prevent this for the same reason as for constraints below. Note
|
||||
* that defaults cannot contain any vars, so it's OK that the
|
||||
* error message refers to generated columns.
|
||||
*/
|
||||
if (found_whole_row)
|
||||
@ -3845,11 +3845,11 @@ transformPartitionBound(ParseState *pstate, Relation parent,
|
||||
* any necessary validation.
|
||||
*/
|
||||
result_spec->lowerdatums =
|
||||
transformPartitionRangeBounds(pstate, spec->lowerdatums,
|
||||
parent);
|
||||
transformPartitionRangeBounds(pstate, spec->lowerdatums,
|
||||
parent);
|
||||
result_spec->upperdatums =
|
||||
transformPartitionRangeBounds(pstate, spec->upperdatums,
|
||||
parent);
|
||||
transformPartitionRangeBounds(pstate, spec->upperdatums,
|
||||
parent);
|
||||
}
|
||||
else
|
||||
elog(ERROR, "unexpected partition strategy: %d", (int) strategy);
|
||||
@ -3876,17 +3876,17 @@ transformPartitionRangeBounds(ParseState *pstate, List *blist,
|
||||
i = j = 0;
|
||||
foreach(lc, blist)
|
||||
{
|
||||
Node *expr = lfirst(lc);
|
||||
Node *expr = lfirst(lc);
|
||||
PartitionRangeDatum *prd = NULL;
|
||||
|
||||
/*
|
||||
* Infinite range bounds -- "minvalue" and "maxvalue" -- get passed
|
||||
* in as ColumnRefs.
|
||||
* Infinite range bounds -- "minvalue" and "maxvalue" -- get passed in
|
||||
* as ColumnRefs.
|
||||
*/
|
||||
if (IsA(expr, ColumnRef))
|
||||
{
|
||||
ColumnRef *cref = (ColumnRef *) expr;
|
||||
char *cname = NULL;
|
||||
ColumnRef *cref = (ColumnRef *) expr;
|
||||
char *cname = NULL;
|
||||
|
||||
/*
|
||||
* There should be a single field named either "minvalue" or
|
||||
@ -3899,8 +3899,8 @@ transformPartitionRangeBounds(ParseState *pstate, List *blist,
|
||||
if (cname == NULL)
|
||||
{
|
||||
/*
|
||||
* ColumnRef is not in the desired single-field-name form.
|
||||
* For consistency between all partition strategies, let the
|
||||
* ColumnRef is not in the desired single-field-name form. For
|
||||
* consistency between all partition strategies, let the
|
||||
* expression transformation report any errors rather than
|
||||
* doing it ourselves.
|
||||
*/
|
||||
@ -3965,8 +3965,8 @@ transformPartitionRangeBounds(ParseState *pstate, List *blist,
|
||||
}
|
||||
|
||||
/*
|
||||
* Once we see MINVALUE or MAXVALUE for one column, the remaining
|
||||
* columns must be the same.
|
||||
* Once we see MINVALUE or MAXVALUE for one column, the remaining columns
|
||||
* must be the same.
|
||||
*/
|
||||
validateInfiniteBounds(pstate, result);
|
||||
|
||||
@ -4030,13 +4030,13 @@ transformPartitionBoundValue(ParseState *pstate, Node *val,
|
||||
|
||||
/*
|
||||
* Check that the input expression's collation is compatible with one
|
||||
* specified for the parent's partition key (partcollation). Don't
|
||||
* throw an error if it's the default collation which we'll replace with
|
||||
* the parent's collation anyway.
|
||||
* specified for the parent's partition key (partcollation). Don't throw
|
||||
* an error if it's the default collation which we'll replace with the
|
||||
* parent's collation anyway.
|
||||
*/
|
||||
if (IsA(value, CollateExpr))
|
||||
{
|
||||
Oid exprCollOid = exprCollation(value);
|
||||
Oid exprCollOid = exprCollation(value);
|
||||
|
||||
if (OidIsValid(exprCollOid) &&
|
||||
exprCollOid != DEFAULT_COLLATION_OID &&
|
||||
|
Reference in New Issue
Block a user