diff options
Diffstat (limited to 'src/backend/commands')
-rw-r--r-- | src/backend/commands/alter.c | 2 | ||||
-rw-r--r-- | src/backend/commands/dbcommands.c | 10 | ||||
-rw-r--r-- | src/backend/commands/event_trigger.c | 6 | ||||
-rw-r--r-- | src/backend/commands/explain.c | 16 | ||||
-rw-r--r-- | src/backend/commands/extension.c | 56 | ||||
-rw-r--r-- | src/backend/commands/functioncmds.c | 2 | ||||
-rw-r--r-- | src/backend/commands/opclasscmds.c | 5 | ||||
-rw-r--r-- | src/backend/commands/publicationcmds.c | 8 | ||||
-rw-r--r-- | src/backend/commands/statscmds.c | 8 | ||||
-rw-r--r-- | src/backend/commands/tablecmds.c | 23 | ||||
-rw-r--r-- | src/backend/commands/trigger.c | 4 |
11 files changed, 68 insertions, 72 deletions
diff --git a/src/backend/commands/alter.c b/src/backend/commands/alter.c index 951690b2b8d..b11ebf0f618 100644 --- a/src/backend/commands/alter.c +++ b/src/backend/commands/alter.c @@ -470,7 +470,7 @@ ExecAlterObjectDependsStmt(AlterObjectDependsStmt *stmt, ObjectAddress *refAddre } else { - List *currexts; + List *currexts; /* Avoid duplicates */ currexts = getAutoExtensionsOfObject(address.classId, diff --git a/src/backend/commands/dbcommands.c b/src/backend/commands/dbcommands.c index 367c30adb01..f27c3fe8c1c 100644 --- a/src/backend/commands/dbcommands.c +++ b/src/backend/commands/dbcommands.c @@ -1947,11 +1947,11 @@ remove_dbtablespaces(Oid db_id) Relation rel; TableScanDesc scan; HeapTuple tuple; - List *ltblspc = NIL; - ListCell *cell; - int ntblspc; - int i; - Oid *tablespace_ids; + List *ltblspc = NIL; + ListCell *cell; + int ntblspc; + int i; + Oid *tablespace_ids; rel = table_open(TableSpaceRelationId, AccessShareLock); scan = table_beginscan_catalog(rel, 0, NULL); diff --git a/src/backend/commands/event_trigger.c b/src/backend/commands/event_trigger.c index 91800d1fac1..918b9b4d8fa 100644 --- a/src/backend/commands/event_trigger.c +++ b/src/backend/commands/event_trigger.c @@ -72,12 +72,6 @@ typedef struct EventTriggerQueryState static EventTriggerQueryState *currentEventTriggerState = NULL; -typedef struct -{ - const char *obtypename; - bool supported; -} event_trigger_support_data; - /* Support for dropped objects */ typedef struct SQLDropObject { diff --git a/src/backend/commands/explain.c b/src/backend/commands/explain.c index 05f4d4c2c2b..058610af9b0 100644 --- a/src/backend/commands/explain.c +++ b/src/backend/commands/explain.c @@ -2886,8 +2886,8 @@ show_incremental_sort_info(IncrementalSortState *incrsortstate, * we don't need to do anything if there were 0 full groups. * * We still have to continue after this block if there are no full groups, - * though, since it's possible that we have workers that did real work even - * if the leader didn't participate. + * though, since it's possible that we have workers that did real work + * even if the leader didn't participate. */ if (fullsortGroupInfo->groupCount > 0) { @@ -2914,8 +2914,8 @@ show_incremental_sort_info(IncrementalSortState *incrsortstate, &incrsortstate->shared_info->sinfo[n]; /* - * If a worker hasn't processed any sort groups at all, then exclude - * it from output since it either didn't launch or didn't + * If a worker hasn't processed any sort groups at all, then + * exclude it from output since it either didn't launch or didn't * contribute anything meaningful. */ fullsortGroupInfo = &incsort_info->fullsortGroupInfo; @@ -2923,8 +2923,8 @@ show_incremental_sort_info(IncrementalSortState *incrsortstate, /* * Since we never have any prefix groups unless we've first sorted * a full groups and transitioned modes (copying the tuples into a - * prefix group), we don't need to do anything if there were 0 full - * groups. + * prefix group), we don't need to do anything if there were 0 + * full groups. */ if (fullsortGroupInfo->groupCount == 0) continue; @@ -3048,8 +3048,8 @@ show_hash_info(HashState *hashstate, ExplainState *es) static void show_hashagg_info(AggState *aggstate, ExplainState *es) { - Agg *agg = (Agg *)aggstate->ss.ps.plan; - int64 memPeakKb = (aggstate->hash_mem_peak + 1023) / 1024; + Agg *agg = (Agg *) aggstate->ss.ps.plan; + int64 memPeakKb = (aggstate->hash_mem_peak + 1023) / 1024; Assert(IsA(aggstate, AggState)); diff --git a/src/backend/commands/extension.c b/src/backend/commands/extension.c index 38cbea385ae..9b669d95b80 100644 --- a/src/backend/commands/extension.c +++ b/src/backend/commands/extension.c @@ -1402,39 +1402,39 @@ CreateExtensionInternal(char *extensionName, * does what is needed, we try to find a sequence of update scripts that * will get us there. */ - filename = get_extension_script_filename(pcontrol, NULL, versionName); - if (stat(filename, &fst) == 0) - { - /* Easy, no extra scripts */ - updateVersions = NIL; - } - else - { - /* Look for best way to install this version */ - List *evi_list; - ExtensionVersionInfo *evi_start; - ExtensionVersionInfo *evi_target; + filename = get_extension_script_filename(pcontrol, NULL, versionName); + if (stat(filename, &fst) == 0) + { + /* Easy, no extra scripts */ + updateVersions = NIL; + } + else + { + /* Look for best way to install this version */ + List *evi_list; + ExtensionVersionInfo *evi_start; + ExtensionVersionInfo *evi_target; - /* Extract the version update graph from the script directory */ - evi_list = get_ext_ver_list(pcontrol); + /* Extract the version update graph from the script directory */ + evi_list = get_ext_ver_list(pcontrol); - /* Identify the target version */ - evi_target = get_ext_ver_info(versionName, &evi_list); + /* Identify the target version */ + evi_target = get_ext_ver_info(versionName, &evi_list); - /* Identify best path to reach target */ - evi_start = find_install_path(evi_list, evi_target, - &updateVersions); + /* Identify best path to reach target */ + evi_start = find_install_path(evi_list, evi_target, + &updateVersions); - /* Fail if no path ... */ - if (evi_start == NULL) - ereport(ERROR, - (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("extension \"%s\" has no installation script nor update path for version \"%s\"", - pcontrol->name, versionName))); + /* Fail if no path ... */ + if (evi_start == NULL) + ereport(ERROR, + (errcode(ERRCODE_INVALID_PARAMETER_VALUE), + errmsg("extension \"%s\" has no installation script nor update path for version \"%s\"", + pcontrol->name, versionName))); - /* Otherwise, install best starting point and then upgrade */ - versionName = evi_start->name; - } + /* Otherwise, install best starting point and then upgrade */ + versionName = evi_start->name; + } /* * Fetch control parameters for installation target version diff --git a/src/backend/commands/functioncmds.c b/src/backend/commands/functioncmds.c index 694114adedc..bb918388842 100644 --- a/src/backend/commands/functioncmds.c +++ b/src/backend/commands/functioncmds.c @@ -1417,7 +1417,7 @@ CreateCast(CreateCastStmt *stmt) char castmethod; HeapTuple tuple; AclResult aclresult; - ObjectAddress myself; + ObjectAddress myself; sourcetypeid = typenameTypeId(NULL, stmt->sourcetype); targettypeid = typenameTypeId(NULL, stmt->targettype); diff --git a/src/backend/commands/opclasscmds.c b/src/backend/commands/opclasscmds.c index 7322cbc154e..7d44d3a049b 100644 --- a/src/backend/commands/opclasscmds.c +++ b/src/backend/commands/opclasscmds.c @@ -338,7 +338,7 @@ DefineOpClass(CreateOpClassStmt *stmt) opfamilyoid, /* oid of containing opfamily */ opclassoid; /* oid of opclass we create */ int maxOpNumber, /* amstrategies value */ - optsProcNumber, /* amoptsprocnum value */ + optsProcNumber, /* amoptsprocnum value */ maxProcNumber; /* amsupport value */ bool amstorage; /* amstorage flag */ List *operators; /* OpFamilyMember list for operators */ @@ -779,7 +779,7 @@ AlterOpFamily(AlterOpFamilyStmt *stmt) Oid amoid, /* our AM's oid */ opfamilyoid; /* oid of opfamily */ int maxOpNumber, /* amstrategies value */ - optsProcNumber, /* amopclassopts value */ + optsProcNumber, /* amopclassopts value */ maxProcNumber; /* amsupport value */ HeapTuple tup; Form_pg_am amform; @@ -1252,6 +1252,7 @@ assignProcTypes(OpFamilyMember *member, Oid amoid, Oid typeoid, ereport(ERROR, (errcode(ERRCODE_INVALID_OBJECT_DEFINITION), errmsg("btree equal image functions must return boolean"))); + /* * pg_amproc functions are indexed by (lefttype, righttype), but * an equalimage function can only be called at CREATE INDEX time. diff --git a/src/backend/commands/publicationcmds.c b/src/backend/commands/publicationcmds.c index 771268f70a2..a5e29b5a827 100644 --- a/src/backend/commands/publicationcmds.c +++ b/src/backend/commands/publicationcmds.c @@ -322,8 +322,8 @@ AlterPublicationOptions(AlterPublicationStmt *stmt, Relation rel, * invalidate all partitions contained in the respective partition * trees, not just those explicitly mentioned in the publication. */ - List *relids = GetPublicationRelations(pubform->oid, - PUBLICATION_PART_ALL); + List *relids = GetPublicationRelations(pubform->oid, + PUBLICATION_PART_ALL); /* * We don't want to send too many individual messages, at some point @@ -380,8 +380,8 @@ AlterPublicationTables(AlterPublicationStmt *stmt, Relation rel, PublicationDropTables(pubid, rels, false); else /* DEFELEM_SET */ { - List *oldrelids = GetPublicationRelations(pubid, - PUBLICATION_PART_ROOT); + List *oldrelids = GetPublicationRelations(pubid, + PUBLICATION_PART_ROOT); List *delrels = NIL; ListCell *oldlc; diff --git a/src/backend/commands/statscmds.c b/src/backend/commands/statscmds.c index 988cdba6f53..e1b1afafd7e 100644 --- a/src/backend/commands/statscmds.c +++ b/src/backend/commands/statscmds.c @@ -431,7 +431,7 @@ AlterStatistics(AlterStatsStmt *stmt) Datum repl_val[Natts_pg_statistic_ext]; bool repl_null[Natts_pg_statistic_ext]; bool repl_repl[Natts_pg_statistic_ext]; - ObjectAddress address; + ObjectAddress address; int newtarget = stmt->stxstattarget; /* Limit statistics target to a sane range */ @@ -455,9 +455,9 @@ AlterStatistics(AlterStatsStmt *stmt) stxoid = get_statistics_object_oid(stmt->defnames, stmt->missing_ok); /* - * If we got here and the OID is not valid, it means the statistics - * does not exist, but the command specified IF EXISTS. So report - * this as a simple NOTICE and we're done. + * If we got here and the OID is not valid, it means the statistics does + * not exist, but the command specified IF EXISTS. So report this as a + * simple NOTICE and we're done. */ if (!OidIsValid(stxoid)) { diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c index a518b552b3d..8d2ed986d18 100644 --- a/src/backend/commands/tablecmds.c +++ b/src/backend/commands/tablecmds.c @@ -177,7 +177,7 @@ typedef struct AlteredTableInfo List *changedIndexOids; /* OIDs of indexes to rebuild */ List *changedIndexDefs; /* string definitions of same */ char *replicaIdentityIndex; /* index to reset as REPLICA IDENTITY */ - char *clusterOnIndex; /* index to use for CLUSTER */ + char *clusterOnIndex; /* index to use for CLUSTER */ } AlteredTableInfo; /* Struct describing one new constraint to check in Phase 3 scan */ @@ -1265,9 +1265,9 @@ RemoveRelations(DropStmt *drop) if (drop->concurrent) { /* - * Note that for temporary relations this lock may get upgraded - * later on, but as no other session can access a temporary - * relation, this is actually fine. + * Note that for temporary relations this lock may get upgraded later + * on, but as no other session can access a temporary relation, this + * is actually fine. */ lockmode = ShareUpdateExclusiveLock; Assert(drop->removeType == OBJECT_INDEX); @@ -1620,10 +1620,10 @@ ExecuteTruncate(TruncateStmt *stmt) } /* - * Inherited TRUNCATE commands perform access - * permission checks on the parent table only. - * So we skip checking the children's permissions - * and don't call truncate_check_perms() here. + * Inherited TRUNCATE commands perform access permission + * checks on the parent table only. So we skip checking the + * children's permissions and don't call + * truncate_check_perms() here. */ truncate_check_rel(RelationGetRelid(rel), rel->rd_rel); truncate_check_activity(rel); @@ -2650,6 +2650,7 @@ MergeAttributes(List *schema, List *supers, char relpersistence, errmsg("column \"%s\" inherits from generated column but specifies identity", def->colname))); } + /* * If the parent column is not generated, then take whatever * the child column definition says. @@ -7500,8 +7501,8 @@ ATExecSetStorage(Relation rel, const char *colName, Node *newValue, LOCKMODE loc */ foreach(lc, RelationGetIndexList(rel)) { - Oid indexoid = lfirst_oid(lc); - Relation indrel; + Oid indexoid = lfirst_oid(lc); + Relation indrel; AttrNumber indattnum = 0; indrel = index_open(indexoid, lockmode); @@ -16993,7 +16994,7 @@ static void DropClonedTriggersFromPartition(Oid partitionId) { ScanKeyData skey; - SysScanDesc scan; + SysScanDesc scan; HeapTuple trigtup; Relation tgrel; ObjectAddresses *objects; diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c index ed551ab73aa..672fccff5bd 100644 --- a/src/backend/commands/trigger.c +++ b/src/backend/commands/trigger.c @@ -2240,8 +2240,8 @@ ExecBRInsertTriggers(EState *estate, ResultRelInfo *relinfo, /* * After a tuple in a partition goes through a trigger, the user - * could have changed the partition key enough that the tuple - * no longer fits the partition. Verify that. + * could have changed the partition key enough that the tuple no + * longer fits the partition. Verify that. */ if (trigger->tgisclone && !ExecPartitionCheck(relinfo, slot, estate, false)) |