docs icon indicating copy to clipboard operation
docs copied to clipboard

alter column/PK data types says it's in preview?

Open glennfawcett opened this issue 1 year ago • 2 comments

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

glennfawcett avatar Mar 15 '24 23:03 glennfawcett

Shannon Bradshaw (shannonbradshaw) commented: Ryan Kuo can you take a quick look at this and either fix and close or comment as to why we should leave the page as is?

exalate-issue-sync[bot] avatar Mar 19 '24 17:03 exalate-issue-sync[bot]

Ryan Kuo (taroface) commented: Hi Glenn Fawcett, thanks for filing. Dikshant Adhikari confirmed that this is still meant to be in Preview. I noticed that the session var associated with this feature hadn’t been documented, so I opened a PR to address that. This issue will be closed once that PR is merged.

exalate-issue-sync[bot] avatar Mar 25 '24 16:03 exalate-issue-sync[bot]