On Wed, 27 Sep 2017 11:31:54 +0200
Tomas Vondra wrote:
> On 09/27/2017 10:08 AM, Jonathan Moules wrote:
> > Hi,
> > (Postgres 9.5 and 9.6)
> > We have a table of about 650million rows. It's a partitioned table, with
> > two "child" tables. We want to change its primary key type from int to
> > bi
Tomas's suggestion definitely is the better if you're altering the
type of a single column. If you need to make more extensive changes
to the table structure, copying usually is the better way to go.
George
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes
On Wed, 27 Sep 2017 09:08:25 +0100, Jonathan Moules
wrote:
>Hi,
>(Postgres 9.5 and 9.6)
>We have a table of about 650million rows. It's a partitioned table,
>with two "child" tables. We want to change its primary key type
>from int to bigint while retaining the current values.
>
>We're using this
On 09/27/2017 10:08 AM, Jonathan Moules wrote:
> Hi,
> (Postgres 9.5 and 9.6)
> We have a table of about 650million rows. It's a partitioned table, with
> two "child" tables. We want to change its primary key type from int to
> bigint while retaining the current values.
>
> We're using this:
>
Hi,
(Postgres 9.5 and 9.6)
We have a table of about 650million rows. It's a partitioned table, with two
"child" tables. We want to change its primary key type from int to bigint while
retaining the current values.
We're using this:
ALTER TABLE dta.my_table ALTER column table_id TYPE bigint;
Bu