diff options
author | Tom Lane | 2022-05-12 19:17:30 +0000 |
---|---|---|
committer | Tom Lane | 2022-05-12 19:17:30 +0000 |
commit | 23e7b38bfe396f919fdb66057174d29e17086418 (patch) | |
tree | 335c3962ef8afe0f6193d0413dbc51642276b147 /src/backend/commands/statscmds.c | |
parent | 93909599cdba64c8759d646983c0a4ef93de1e50 (diff) |
Pre-beta mechanical code beautification.
Run pgindent, pgperltidy, and reformat-dat-files.
I manually fixed a couple of comments that pgindent uglified.
Diffstat (limited to 'src/backend/commands/statscmds.c')
-rw-r--r-- | src/backend/commands/statscmds.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/backend/commands/statscmds.c b/src/backend/commands/statscmds.c index 54a190722df..2e716743dd6 100644 --- a/src/backend/commands/statscmds.c +++ b/src/backend/commands/statscmds.c @@ -258,9 +258,9 @@ CreateStatistics(CreateStatsStmt *stmt) nattnums++; ReleaseSysCache(atttuple); } - else if (IsA(selem->expr, Var)) /* column reference in parens */ + else if (IsA(selem->expr, Var)) /* column reference in parens */ { - Var *var = (Var *) selem->expr; + Var *var = (Var *) selem->expr; TypeCacheEntry *type; /* Disallow use of system attributes in extended stats */ @@ -297,10 +297,11 @@ CreateStatistics(CreateStatsStmt *stmt) while ((k = bms_next_member(attnums, k)) >= 0) { AttrNumber attnum = k + FirstLowInvalidHeapAttributeNumber; + if (attnum <= 0) ereport(ERROR, - (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("statistics creation on system columns is not supported"))); + (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), + errmsg("statistics creation on system columns is not supported"))); } /* @@ -511,9 +512,9 @@ CreateStatistics(CreateStatsStmt *stmt) relation_close(statrel, RowExclusiveLock); /* - * We used to create the pg_statistic_ext_data tuple too, but it's not clear - * what value should the stxdinherit flag have (it depends on whether the rel - * is partitioned, contains data, etc.) + * We used to create the pg_statistic_ext_data tuple too, but it's not + * clear what value should the stxdinherit flag have (it depends on + * whether the rel is partitioned, contains data, etc.) */ InvokeObjectPostCreateHook(StatisticExtRelationId, statoid, 0); |