Commit 9e1c9f95 authored by Tom Lane's avatar Tom Lane

pgindent run prior to branching v12.

pgperltidy and reformat-dat-files too, though the latter didn't
find anything to change.
parent 145b1868
...@@ -64,6 +64,7 @@ typedef struct PgFdwRelationInfo ...@@ -64,6 +64,7 @@ typedef struct PgFdwRelationInfo
int width; int width;
Cost startup_cost; Cost startup_cost;
Cost total_cost; Cost total_cost;
/* /*
* Estimated number of rows fetched from the foreign server, and costs * Estimated number of rows fetched from the foreign server, and costs
* excluding costs for transferring those rows from the foreign server. * excluding costs for transferring those rows from the foreign server.
......
...@@ -1085,9 +1085,9 @@ DefineIndex(Oid relationId, ...@@ -1085,9 +1085,9 @@ DefineIndex(Oid relationId,
childrel = table_open(childRelid, lockmode); childrel = table_open(childRelid, lockmode);
/* /*
* Don't try to create indexes on foreign tables, though. * Don't try to create indexes on foreign tables, though. Skip
* Skip those if a regular index, or fail if trying to create * those if a regular index, or fail if trying to create a
* a constraint index. * constraint index.
*/ */
if (childrel->rd_rel->relkind == RELKIND_FOREIGN_TABLE) if (childrel->rd_rel->relkind == RELKIND_FOREIGN_TABLE)
{ {
...@@ -1097,7 +1097,7 @@ DefineIndex(Oid relationId, ...@@ -1097,7 +1097,7 @@ DefineIndex(Oid relationId,
errmsg("cannot create unique index on partitioned table \"%s\"", errmsg("cannot create unique index on partitioned table \"%s\"",
RelationGetRelationName(rel)), RelationGetRelationName(rel)),
errdetail("Table \"%s\" contains partitions that are foreign tables.", errdetail("Table \"%s\" contains partitions that are foreign tables.",
RelationGetRelationName(rel)))); RelationGetRelationName(rel))));
table_close(childrel, lockmode); table_close(childrel, lockmode);
continue; continue;
......
...@@ -1077,7 +1077,7 @@ DefineRelation(CreateStmt *stmt, char relkind, Oid ownerId, ...@@ -1077,7 +1077,7 @@ DefineRelation(CreateStmt *stmt, char relkind, Oid ownerId,
errmsg("cannot create foreign partition of partitioned table \"%s\"", errmsg("cannot create foreign partition of partitioned table \"%s\"",
RelationGetRelationName(parent)), RelationGetRelationName(parent)),
errdetail("Table \"%s\" contains indexes that are unique.", errdetail("Table \"%s\" contains indexes that are unique.",
RelationGetRelationName(parent)))); RelationGetRelationName(parent))));
else else
{ {
index_close(idxRel, AccessShareLock); index_close(idxRel, AccessShareLock);
...@@ -15682,6 +15682,7 @@ ATExecAttachPartition(List **wqueue, Relation rel, PartitionCmd *cmd) ...@@ -15682,6 +15682,7 @@ ATExecAttachPartition(List **wqueue, Relation rel, PartitionCmd *cmd)
defaultrel = table_open(defaultPartOid, NoLock); defaultrel = table_open(defaultPartOid, NoLock);
defPartConstraint = defPartConstraint =
get_proposed_default_constraint(partBoundConstraint); get_proposed_default_constraint(partBoundConstraint);
/* /*
* Map the Vars in the constraint expression from rel's attnos to * Map the Vars in the constraint expression from rel's attnos to
* defaultrel's. * defaultrel's.
......
...@@ -1211,8 +1211,8 @@ check_temp_tablespaces(char **newval, void **extra, GucSource source) ...@@ -1211,8 +1211,8 @@ check_temp_tablespaces(char **newval, void **extra, GucSource source)
/* /*
* If we aren't inside a transaction, or connected to a database, we * If we aren't inside a transaction, or connected to a database, we
* cannot do the catalog accesses necessary to verify the name. Must * cannot do the catalog accesses necessary to verify the name. Must
* accept the value on faith. * accept the value on faith. Fortunately, there's then also no need to
* Fortunately, there's then also no need to pass the data to fd.c. * pass the data to fd.c.
*/ */
if (IsTransactionState() && MyDatabaseId != InvalidOid) if (IsTransactionState() && MyDatabaseId != InvalidOid)
{ {
......
...@@ -528,9 +528,8 @@ ExecInitIndexOnlyScan(IndexOnlyScan *node, EState *estate, int eflags) ...@@ -528,9 +528,8 @@ ExecInitIndexOnlyScan(IndexOnlyScan *node, EState *estate, int eflags)
&TTSOpsVirtual); &TTSOpsVirtual);
/* /*
* We need another slot, in a format that's suitable for the table AM, * We need another slot, in a format that's suitable for the table AM, for
* for when we need to fetch a tuple from the table for rechecking * when we need to fetch a tuple from the table for rechecking visibility.
* visibility.
*/ */
indexstate->ioss_TableSlot = indexstate->ioss_TableSlot =
ExecAllocTableSlot(&estate->es_tupleTable, ExecAllocTableSlot(&estate->es_tupleTable,
......
...@@ -2317,8 +2317,8 @@ ExecInitModifyTable(ModifyTable *node, EState *estate, int eflags) ...@@ -2317,8 +2317,8 @@ ExecInitModifyTable(ModifyTable *node, EState *estate, int eflags)
* indexes for insertion of new index entries. Note we *must* set * indexes for insertion of new index entries. Note we *must* set
* estate->es_result_relation_info correctly while we initialize each * estate->es_result_relation_info correctly while we initialize each
* sub-plan; external modules such as FDWs may depend on that (see * sub-plan; external modules such as FDWs may depend on that (see
* contrib/postgres_fdw/postgres_fdw.c: postgresBeginDirectModify() * contrib/postgres_fdw/postgres_fdw.c: postgresBeginDirectModify() as one
* as one example). * example).
*/ */
saved_resultRelInfo = estate->es_result_relation_info; saved_resultRelInfo = estate->es_result_relation_info;
......
...@@ -1237,13 +1237,14 @@ check_default_partition_contents(Relation parent, Relation default_rel, ...@@ -1237,13 +1237,14 @@ check_default_partition_contents(Relation parent, Relation default_rel,
: get_qual_for_range(parent, new_spec, false); : get_qual_for_range(parent, new_spec, false);
def_part_constraints = def_part_constraints =
get_proposed_default_constraint(new_part_constraints); get_proposed_default_constraint(new_part_constraints);
/* /*
* Map the Vars in the constraint expression from parent's attnos to * Map the Vars in the constraint expression from parent's attnos to
* default_rel's. * default_rel's.
*/ */
def_part_constraints = def_part_constraints =
map_partition_varattnos(def_part_constraints, 1, default_rel, map_partition_varattnos(def_part_constraints, 1, default_rel,
parent, NULL); parent, NULL);
/* /*
* If the existing constraints on the default partition imply that it will * If the existing constraints on the default partition imply that it will
......
...@@ -61,7 +61,7 @@ pg_lsn_in(PG_FUNCTION_ARGS) ...@@ -61,7 +61,7 @@ pg_lsn_in(PG_FUNCTION_ARGS)
{ {
char *str = PG_GETARG_CSTRING(0); char *str = PG_GETARG_CSTRING(0);
XLogRecPtr result; XLogRecPtr result;
bool have_error = false; bool have_error = false;
result = pg_lsn_in_internal(str, &have_error); result = pg_lsn_in_internal(str, &have_error);
if (have_error) if (have_error)
......
...@@ -728,7 +728,7 @@ static const struct cachedesc cacheinfo[] = { ...@@ -728,7 +728,7 @@ static const struct cachedesc cacheinfo[] = {
}, },
32 32
}, },
{StatisticExtDataRelationId, /* STATEXTDATASTXOID */ {StatisticExtDataRelationId, /* STATEXTDATASTXOID */
StatisticExtDataStxoidIndexId, StatisticExtDataStxoidIndexId,
1, 1,
{ {
......
...@@ -11615,7 +11615,7 @@ check_recovery_target_time(char **newval, void **extra, GucSource source) ...@@ -11615,7 +11615,7 @@ check_recovery_target_time(char **newval, void **extra, GucSource source)
dterr = DecodeDateTime(field, ftype, nf, &dtype, tm, &fsec, &tz); dterr = DecodeDateTime(field, ftype, nf, &dtype, tm, &fsec, &tz);
if (dterr != 0) if (dterr != 0)
return false; return false;
if (dtype != DTK_DATE) if (dtype != DTK_DATE)
return false; return false;
if (tm2timestamp(tm, fsec, &tz, &timestamp) != 0) if (tm2timestamp(tm, fsec, &tz, &timestamp) != 0)
......
...@@ -699,8 +699,9 @@ scan_available_timezones(char *tzdir, char *tzdirsub, struct tztry *tt, ...@@ -699,8 +699,9 @@ scan_available_timezones(char *tzdir, char *tzdirsub, struct tztry *tt,
else if (score == *bestscore) else if (score == *bestscore)
{ {
/* Consider how to break a tie */ /* Consider how to break a tie */
int namepref = (zone_name_pref(tzdirsub) - int namepref = (zone_name_pref(tzdirsub) -
zone_name_pref(bestzonename)); zone_name_pref(bestzonename));
if (namepref > 0 || if (namepref > 0 ||
(namepref == 0 && (namepref == 0 &&
(strlen(tzdirsub) < strlen(bestzonename) || (strlen(tzdirsub) < strlen(bestzonename) ||
......
...@@ -34,9 +34,9 @@ CATALOG(pg_statistic_ext_data,3429,StatisticExtDataRelationId) ...@@ -34,9 +34,9 @@ CATALOG(pg_statistic_ext_data,3429,StatisticExtDataRelationId)
#ifdef CATALOG_VARLEN /* variable-length fields start here */ #ifdef CATALOG_VARLEN /* variable-length fields start here */
pg_ndistinct stxdndistinct; /* ndistinct coefficients (serialized) */ pg_ndistinct stxdndistinct; /* ndistinct coefficients (serialized) */
pg_dependencies stxddependencies; /* dependencies (serialized) */ pg_dependencies stxddependencies; /* dependencies (serialized) */
pg_mcv_list stxdmcv; /* MCV (serialized) */ pg_mcv_list stxdmcv; /* MCV (serialized) */
#endif #endif
...@@ -47,6 +47,6 @@ CATALOG(pg_statistic_ext_data,3429,StatisticExtDataRelationId) ...@@ -47,6 +47,6 @@ CATALOG(pg_statistic_ext_data,3429,StatisticExtDataRelationId)
* the format of pg_statistic_ext_data relation. * the format of pg_statistic_ext_data relation.
* ---------------- * ----------------
*/ */
typedef FormData_pg_statistic_ext_data *Form_pg_statistic_ext_data; typedef FormData_pg_statistic_ext_data * Form_pg_statistic_ext_data;
#endif /* PG_STATISTIC_EXT_DATA_H */ #endif /* PG_STATISTIC_EXT_DATA_H */
...@@ -42,12 +42,12 @@ my $contrib_extrasource = { ...@@ -42,12 +42,12 @@ my $contrib_extrasource = {
'seg' => [ 'contrib/seg/segscan.l', 'contrib/seg/segparse.y' ], 'seg' => [ 'contrib/seg/segscan.l', 'contrib/seg/segparse.y' ],
}; };
my @contrib_excludes = ( my @contrib_excludes = (
'commit_ts', 'hstore_plperl', 'commit_ts', 'hstore_plperl',
'hstore_plpython', 'intagg', 'hstore_plpython', 'intagg',
'jsonb_plperl', 'jsonb_plpython', 'jsonb_plperl', 'jsonb_plpython',
'ltree_plpython', 'pgcrypto', 'ltree_plpython', 'pgcrypto',
'sepgsql', 'brin', 'sepgsql', 'brin',
'test_extensions', 'test_pg_dump', 'test_extensions', 'test_pg_dump',
'snapshot_too_old', 'unsafe_tests'); 'snapshot_too_old', 'unsafe_tests');
# Set of variables for frontend modules # Set of variables for frontend modules
......
...@@ -50,6 +50,7 @@ DOING THE INDENT RUN: ...@@ -50,6 +50,7 @@ DOING THE INDENT RUN:
5) Reformat the bootstrap catalog data files: 5) Reformat the bootstrap catalog data files:
./configure # "make" will not work in an unconfigured tree
cd src/include/catalog cd src/include/catalog
make reformat-dat-files make reformat-dat-files
cd ../../.. cd ../../..
......
...@@ -729,7 +729,6 @@ FormData_pg_sequence_data ...@@ -729,7 +729,6 @@ FormData_pg_sequence_data
FormData_pg_shdepend FormData_pg_shdepend
FormData_pg_statistic FormData_pg_statistic
FormData_pg_statistic_ext FormData_pg_statistic_ext
FormData_pg_statistic_ext_data
FormData_pg_subscription FormData_pg_subscription
FormData_pg_subscription_rel FormData_pg_subscription_rel
FormData_pg_tablespace FormData_pg_tablespace
...@@ -787,7 +786,6 @@ Form_pg_sequence_data ...@@ -787,7 +786,6 @@ Form_pg_sequence_data
Form_pg_shdepend Form_pg_shdepend
Form_pg_statistic Form_pg_statistic
Form_pg_statistic_ext Form_pg_statistic_ext
Form_pg_statistic_ext_data
Form_pg_subscription Form_pg_subscription
Form_pg_subscription_rel Form_pg_subscription_rel
Form_pg_tablespace Form_pg_tablespace
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment