issue/6694
Gokhan Gulbiz 2023-02-28 15:12:08 +03:00
parent e684e15e40
commit 9e45f8c6b7
No known key found for this signature in database
GPG Key ID: 608EF06B6BD1B45B
4 changed files with 14 additions and 11 deletions

View File

@ -1541,6 +1541,7 @@ CreateMaterializedViewDDLCommand(Oid matViewOid)
return query->data; return query->data;
} }
/* /*
* ReplaceTable replaces the source table with the target table. * ReplaceTable replaces the source table with the target table.
* It moves all the rows of the source table to target table with INSERT SELECT. * It moves all the rows of the source table to target table with INSERT SELECT.

View File

@ -1805,8 +1805,6 @@ ErrorIfTableIsACatalogTable(Relation relation)
} }
/* /*
* This function marks all the identity sequences as distributed on the given table. * This function marks all the identity sequences as distributed on the given table.
*/ */
@ -1846,11 +1844,9 @@ MarkIdentitiesAsDistributed(Oid targetRelationId)
quote_literal_cstr(tableName)); quote_literal_cstr(tableName));
SendCommandToWorkersWithMetadata(stringInfo->data); SendCommandToWorkersWithMetadata(stringInfo->data);
} }
} }
/* /*
* EnsureLocalTableEmptyIfNecessary errors out if the function should be empty * EnsureLocalTableEmptyIfNecessary errors out if the function should be empty
* according to ShouldLocalTableBeEmpty but it is not. * according to ShouldLocalTableBeEmpty but it is not.

View File

@ -3991,11 +3991,13 @@ ErrorIfTableHasUnsupportedIdentityColumn(Oid relationId)
if (attributeForm->attidentity && attributeForm->atttypid != INT8OID) if (attributeForm->attidentity && attributeForm->atttypid != INT8OID)
{ {
ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), 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 * ErrorIfTableHasIdentityColumn errors out if the given table has identity column
*/ */
@ -4014,7 +4016,8 @@ ErrorIfTableHasIdentityColumn(Oid relationId)
if (attributeForm->attidentity) if (attributeForm->attidentity)
{ {
ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), 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")));
} }
} }
} }

View File

@ -133,6 +133,7 @@ worker_apply_inter_shard_ddl_command(PG_FUNCTION_ARGS)
PG_RETURN_VOID(); PG_RETURN_VOID();
} }
/* /*
* worker_modify_identity_columns takes a table oid, runs an ALTER SEQUENCE statement * 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 * for each identity column to adjust the minvalue and maxvalue of the sequence owned by
@ -168,13 +169,15 @@ worker_modify_identity_columns(PG_FUNCTION_ARGS)
char *sequenceName = get_rel_name(sequenceOid); char *sequenceName = get_rel_name(sequenceOid);
Oid sequenceTypeId = pg_get_sequencedef(sequenceOid)->seqtypid; Oid sequenceTypeId = pg_get_sequencedef(sequenceOid)->seqtypid;
AlterSequenceMinMax(sequenceOid, sequenceSchemaName, sequenceName, sequenceTypeId); AlterSequenceMinMax(sequenceOid, sequenceSchemaName, sequenceName,
sequenceTypeId);
} }
} }
PG_RETURN_VOID(); PG_RETURN_VOID();
} }
/* /*
* worker_apply_sequence_command takes a CREATE SEQUENCE command string, runs the * worker_apply_sequence_command takes a CREATE SEQUENCE command string, runs the
* CREATE SEQUENCE command then creates and runs an ALTER SEQUENCE statement * CREATE SEQUENCE command then creates and runs an ALTER SEQUENCE statement