Search Postgresql Archives

Re: Altering multiple column types

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks for confirming, so I know I'm not going crazy :)

FWIW, it works on 10.3 to 10.8 (I think) and looks like a regression.

psql (10.3 (Debian 10.3-2))
Type "help" for help.

test=# create table users(id serial primary key, name varchar(255), email varchar(255), age int);
CREATE TABLE
Time: 26.650 ms
test=# create index users_name_idx on users(name); create index users_email_idx on users(email);
CREATE INDEX
Time: 15.660 ms
CREATE INDEX
Time: 12.065 ms
test=# alter table users alter column name type text, alter column email type text;
ALTER TABLE
Time: 7.213 ms
test=# select version();
                                                 version                                                
---------------------------------------------------------------------------------------------------------
 PostgreSQL 10.3 (Debian 10.3-2) on x86_64-pc-linux-gnu, compiled by gcc (Debian 7.3.0-11) 7.3.0, 64-bit
(1 row)

Time: 2.683 ms




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux