From 9e45f8c6b7a56b60e3e6012267789775ec578575 Mon Sep 17 00:00:00 2001 From: Gokhan Gulbiz Date: Tue, 28 Feb 2023 15:12:08 +0300 Subject: [PATCH] Indent --- src/backend/distributed/commands/alter_table.c | 1 + .../distributed/commands/create_distributed_table.c | 8 ++------ src/backend/distributed/commands/table.c | 7 +++++-- .../distributed/worker/worker_data_fetch_protocol.c | 9 ++++++--- 4 files changed, 14 insertions(+), 11 deletions(-) diff --git a/src/backend/distributed/commands/alter_table.c b/src/backend/distributed/commands/alter_table.c index 57b737c8c..8ff77bdc6 100644 --- a/src/backend/distributed/commands/alter_table.c +++ b/src/backend/distributed/commands/alter_table.c @@ -1541,6 +1541,7 @@ CreateMaterializedViewDDLCommand(Oid matViewOid) return query->data; } + /* * ReplaceTable replaces the source table with the target table. * It moves all the rows of the source table to target table with INSERT SELECT. diff --git a/src/backend/distributed/commands/create_distributed_table.c b/src/backend/distributed/commands/create_distributed_table.c index a95c66fec..ea52bfd1d 100644 --- a/src/backend/distributed/commands/create_distributed_table.c +++ b/src/backend/distributed/commands/create_distributed_table.c @@ -1805,8 +1805,6 @@ ErrorIfTableIsACatalogTable(Relation relation) } - - /* * This function marks all the identity sequences as distributed on the given table. */ @@ -1842,15 +1840,13 @@ MarkIdentitiesAsDistributed(Oid targetRelationId) char *tableName = generate_qualified_relation_name(targetRelationId); appendStringInfo(stringInfo, - WORKER_MODIFY_IDENTITY_COMMAND, - quote_literal_cstr(tableName)); + WORKER_MODIFY_IDENTITY_COMMAND, + quote_literal_cstr(tableName)); SendCommandToWorkersWithMetadata(stringInfo->data); } - } - /* * EnsureLocalTableEmptyIfNecessary errors out if the function should be empty * according to ShouldLocalTableBeEmpty but it is not. diff --git a/src/backend/distributed/commands/table.c b/src/backend/distributed/commands/table.c index a229bbb84..8ecdbdd69 100644 --- a/src/backend/distributed/commands/table.c +++ b/src/backend/distributed/commands/table.c @@ -3991,11 +3991,13 @@ ErrorIfTableHasUnsupportedIdentityColumn(Oid relationId) if (attributeForm->attidentity && attributeForm->atttypid != INT8OID) { ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("cannot complete operation on a table with smallint/int identity column"))); + errmsg( + "cannot complete operation on a table with smallint/int identity column"))); } } } + /* * ErrorIfTableHasIdentityColumn errors out if the given table has identity column */ @@ -4014,7 +4016,8 @@ ErrorIfTableHasIdentityColumn(Oid relationId) if (attributeForm->attidentity) { ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("cannot complete operation on a table with identity column"))); + errmsg( + "cannot complete operation on a table with identity column"))); } } } diff --git a/src/backend/distributed/worker/worker_data_fetch_protocol.c b/src/backend/distributed/worker/worker_data_fetch_protocol.c index 758b42343..f26fb4892 100644 --- a/src/backend/distributed/worker/worker_data_fetch_protocol.c +++ b/src/backend/distributed/worker/worker_data_fetch_protocol.c @@ -133,6 +133,7 @@ worker_apply_inter_shard_ddl_command(PG_FUNCTION_ARGS) PG_RETURN_VOID(); } + /* * worker_modify_identity_columns takes a table oid, runs an ALTER SEQUENCE statement * for each identity column to adjust the minvalue and maxvalue of the sequence owned by @@ -160,21 +161,23 @@ worker_modify_identity_columns(PG_FUNCTION_ARGS) if (attributeForm->attidentity) { Oid sequenceOid = getIdentitySequence(tableRelationId, - attributeForm->attnum, - missingSequenceOk); + attributeForm->attnum, + missingSequenceOk); Oid sequenceSchemaOid = get_rel_namespace(sequenceOid); char *sequenceSchemaName = get_namespace_name(sequenceSchemaOid); char *sequenceName = get_rel_name(sequenceOid); Oid sequenceTypeId = pg_get_sequencedef(sequenceOid)->seqtypid; - AlterSequenceMinMax(sequenceOid, sequenceSchemaName, sequenceName, sequenceTypeId); + AlterSequenceMinMax(sequenceOid, sequenceSchemaName, sequenceName, + sequenceTypeId); } } PG_RETURN_VOID(); } + /* * worker_apply_sequence_command takes a CREATE SEQUENCE command string, runs the * CREATE SEQUENCE command then creates and runs an ALTER SEQUENCE statement