-
Notifications
You must be signed in to change notification settings - Fork 4.1k
sql: make the CockroachDB integer types more compatible with postgres #26925
Copy link
Copy link
Open
Labels
A-sql-datatypesSQL column types usable in table descriptors.SQL column types usable in table descriptors.A-sql-pgcompatSemantic compatibility with PostgreSQLSemantic compatibility with PostgreSQLC-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.T-sql-foundationsSQL Foundations Team (formerly SQL Schema + SQL Sessions)SQL Foundations Team (formerly SQL Schema + SQL Sessions)X-anchored-telemetryThe issue number is anchored by telemetry references.The issue number is anchored by telemetry references.
Metadata
Metadata
Assignees
Labels
A-sql-datatypesSQL column types usable in table descriptors.SQL column types usable in table descriptors.A-sql-pgcompatSemantic compatibility with PostgreSQLSemantic compatibility with PostgreSQLC-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.T-sql-foundationsSQL Foundations Team (formerly SQL Schema + SQL Sessions)SQL Foundations Team (formerly SQL Schema + SQL Sessions)X-anchored-telemetryThe issue number is anchored by telemetry references.The issue number is anchored by telemetry references.
intint4, never shows up in vtablesint2int(thus wrong width), shows up as "int2" in certain vtablesint4int(thus wrong width), shows up as "int4" in certain vtablesint8int, shows up as "int8" in certain vtablesbigintint, shows up as "bigint" in certain vtablesint8, never shows up in vtablessmallintint(thus wrong width) shows up as "smallint" in certain vtablesint2, never shows up in vtablesserialint(thus wrong width) withdefault unique_rowid()int4, create sequence anddefault nextval(seqname)bigserialserialint8, create sequence anddefault nextval(seqname)smallserialserial(thus wrong width)int2, create sequence anddefault nextval(seqname)bitint, shows up asbitin certain vtables, max 64-bitProblems:
int,int2,int4,serial,smallserial,bithave data width that are fully incompatible with postgresqlserialtypes uses sequences, CockroachDB does not do thisbithas incorrectly a maximum size (and its underlying implementation is currently incorrect)Fixing this would comprehensively adress #24062 #22607 #26730 #25098 #24686 and possibly others.
Informs #26128.
Jira issue: CRDB-4979
Epic CRDB-60813