Re: alter column type

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Casey Deccio <casey(at)deccio(dot)net>
Cc: Melvin Davidson <melvin6925(at)gmail(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: alter column type
Date: 2015-06-05 19:42:52
Message-ID: 26382.1433533372@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Casey Deccio <casey(at)deccio(dot)net> writes:
> Being unfamiliar with the internals, what's the risk here? If postgres
> thinks something is a bigint, but previously stored it as an int, does that
> mean it will try to extract data beyond the boundary of some of the (old)
> 32-bit values and potentially throw off offsets for other values?

Yes. This *will* break your table, spectacularly. The other person who
was opining that it would work has no understanding of the actual storage
layout.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message John R Pierce 2015-06-05 20:00:22 Re: alter column type
Previous Message Steve Crawford 2015-06-05 19:34:05 Re: Re: [GENERAL] Re: Query running slow for only one specific id. (Postgres 9.3) version