mirror of https://github.com/citusdata/citus.git
Improve error messages
parent
529d7da33d
commit
c893454bb8
|
@ -3993,10 +3993,12 @@ ErrorIfTableHasUnsupportedIdentityColumn(Oid relationId)
|
|||
|
||||
if (attributeForm->attidentity && attributeForm->atttypid != INT8OID)
|
||||
{
|
||||
relation_close(relation, AccessShareLock);
|
||||
char *qualifiedRelationName = generate_qualified_relation_name(relationId);
|
||||
ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
|
||||
errmsg(
|
||||
"cannot complete operation on a table with smallint/int identity column")));
|
||||
"cannot complete operation on %s with smallint/int identity column", qualifiedRelationName),
|
||||
errhint(
|
||||
"Use bigint identity column instead.")));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -21,9 +21,11 @@ CREATE TABLE smallint_identity_column (
|
|||
a smallint GENERATED BY DEFAULT AS IDENTITY
|
||||
);
|
||||
SELECT create_distributed_table('smallint_identity_column', 'a');
|
||||
ERROR: cannot complete operation on a table with smallint/int identity column
|
||||
ERROR: cannot complete operation on generated_identities.smallint_identity_column with smallint/int identity column
|
||||
HINT: Use bigint identity column instead.
|
||||
SELECT create_distributed_table_concurrently('smallint_identity_column', 'a');
|
||||
ERROR: cannot complete operation on a table with smallint/int identity column
|
||||
ERROR: cannot complete operation on generated_identities.smallint_identity_column with smallint/int identity column
|
||||
HINT: Use bigint identity column instead.
|
||||
SELECT create_reference_table('smallint_identity_column');
|
||||
ERROR: cannot complete operation on a table with identity column
|
||||
SELECT citus_add_local_table_to_metadata('smallint_identity_column');
|
||||
|
@ -38,9 +40,11 @@ CREATE TABLE int_identity_column (
|
|||
a int GENERATED BY DEFAULT AS IDENTITY
|
||||
);
|
||||
SELECT create_distributed_table('int_identity_column', 'a');
|
||||
ERROR: cannot complete operation on a table with smallint/int identity column
|
||||
ERROR: cannot complete operation on generated_identities.int_identity_column with smallint/int identity column
|
||||
HINT: Use bigint identity column instead.
|
||||
SELECT create_distributed_table_concurrently('int_identity_column', 'a');
|
||||
ERROR: cannot complete operation on a table with smallint/int identity column
|
||||
ERROR: cannot complete operation on generated_identities.int_identity_column with smallint/int identity column
|
||||
HINT: Use bigint identity column instead.
|
||||
SELECT create_reference_table('int_identity_column');
|
||||
ERROR: cannot complete operation on a table with identity column
|
||||
SELECT citus_add_local_table_to_metadata('int_identity_column');
|
||||
|
|
Loading…
Reference in New Issue