Open
Description
Glenn Fawcett (glennfawcett) commented:
https://www.cockroachlabs.com/docs/stable/alter-table#alter-column-data-types
^^^--- Says that altering a column size is in "preview". I believe this has been working for a while now. This is a ping to review page.
root@localhost:26257/defaultdb> create table small_id(id int4 primary key);
CREATE TABLE
Time: 22ms total (execution 21ms / network 0ms)
root@localhost:26257/defaultdb> insert into small_id values (1),(2);
INSERT 0 2
Time: 18ms total (execution 18ms / network 0ms)
root@localhost:26257/defaultdb> insert into small_id values (11111111111);
ERROR: integer out of range for type int4
SQLSTATE: 22003
root@localhost:26257/defaultdb> alter table small_id alter column id set data type int8;
ALTER TABLE
Time: 155ms total (execution 155ms / network 0ms)
root@localhost:26257/defaultdb> insert into small_id values (11111111111);
INSERT 0 1
Time: 8ms total (execution 8ms / network 0ms)
root@localhost:26257/defaultdb>
Jira Issue: DOC-9890