You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In PostgreSQL the INTEGER type (or INT type) is 4 bytes wide, and has a min and max of -2147483648 and +2147483647, respectively. In CockroachDB the INTEGER / INT type is 8 bytes wide, and has a min and max of -9223372036854775807 and +9223372036854775807, respectively.
The ranges of the integer types are already covered in int.html but I think it would help to also spell out this difference from PostgreSQL in postgresql-compatibility.html#features-that-differ-from-postgresql.
Demonstration, on PostgreSQL 14.2:
michae2=# SELECT 2147483648::INT;
2022-03-29 15:42:54.876 PDT [57108] ERROR: integer out of range
2022-03-29 15:42:54.876 PDT [57108] STATEMENT: SELECT 2147483648::INT;
ERROR: integer out of range
I see, this is discussed more in int.html#considerations-for-64-bit-signed-integers. Maybe there could be a link from postgresql-compatibility.html#features-that-differ-from-postgresql?
Michael Erickson (michae2) commented:
In PostgreSQL the INTEGER type (or INT type) is 4 bytes wide, and has a min and max of -2147483648 and +2147483647, respectively. In CockroachDB the INTEGER / INT type is 8 bytes wide, and has a min and max of -9223372036854775807 and +9223372036854775807, respectively.
The ranges of the integer types are already covered in
int.html
but I think it would help to also spell out this difference from PostgreSQL inpostgresql-compatibility.html#features-that-differ-from-postgresql
.Demonstration, on PostgreSQL 14.2:
And CockroachDB 22.1:
Jira Issue: DOC-3069
Jira Issue: DOC-4430
The text was updated successfully, but these errors were encountered: