Re: Alter table fast

From: shammat(at)gmx(dot)net
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Alter table fast
Date: 2025-01-09 19:52:27
Message-ID: 9e3d705e-df1d-4d32-b5ba-718f492cb1cc@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Am 09.01.25 um 20:17 schrieb veem v:
>> Out of curiosity, why NUMERIC(15,0) instead of BIGINT?
>
> It's for aligning the database column types to the data model and
> it's happening across all the upstream downstream systems. I was
> thinking if this can be made faster with the single line alter
> statement "Alter table <table_name> alter column <column_name> type
> numeric(15,0) USING <column_name>::NUMERIC(15,0);"

Hmm, I would rather change numeric(15,0) to bigint if I had to "align" types across systems.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Andy Hartman 2025-01-09 20:16:40 Display Bytea field
Previous Message veem v 2025-01-09 19:17:14 Re: Alter table fast