On Fri, Jun 5, 2015 at 4:00 PM, John R Pierce wrote:
> Actually, not too late. My first ALTER is still running, and I still have
> four more to go. Sigh. I had thought of this but wasn't sure how it might
> compare. Thanks for the data point :)
>
>
>
> if all 5 alters' were to the same table,
On Fri, Jun 5, 2015 at 2:23 PM, Melvin Davidson
wrote:
> CAUTION: This is very dangerous and may cause corruption.
> *** DO THIS IN A TEST DATABASE FIRST ***
>
> --1. Get the oid for int8 (bigint)
> SELECT t.oid
> FROM pg_type t
> WHERE typname = 'int8';
>
> --2. Get the oid for your t
On Fri, Jun 5, 2015 at 2:36 PM, Michael Nolan wrote:
>
> Probably too late for this time, but in the past when I've needed to
> redefine the type for a column, I've made a dump, edited the dump file to
> change the type and then renamed the table and reloaded it. That's usually
> several orders
I have a database in which one table references the primary key of
another. The type of the primary key was initially int, but I changed it
to bigint. However, I forgot to update the type of a column that
references it. So, I've initiated "ALTER TABLE foo ALTER COLUMN bar TYPE
bigint", where foo