Re: Updating pg_attribute to change field's data type from integer to bigint on very large table

Поиск
Список
Период
Сортировка
От Jasen Betts
Тема Re: Updating pg_attribute to change field's data type from integer to bigint on very large table
Дата
Msg-id jmd4fj$jjp$1@reversiblemaps.ath.cx
обсуждение исходный текст
Ответ на Updating pg_attribute to change field's data type from integer to bigint on very large table  (Jeff Adams <jeff.adams@noaa.gov>)
Список pgsql-general
On 2012-04-13, Jeff Adams <jeff.adams@noaa.gov> wrote:
> --e89a8ff1c1e8d37deb04bd922a84
> Content-Type: text/plain; charset=ISO-8859-1
>
> Thanks for the ideas Steve. I am actually working with a partitioned table
> and the field I am modifying is the id field (I have reached the cap on the
> integer data type and need to modify it to bigint - very poor planning on
> my part!), but no related tables exist. The id field in the partitioned
> tables is inherited, so I figured I needed to alter the column in the
> parent table. Does this information point towards an optimal solution?
> Thanks again...

you can drop the inheritance and alter the tables one at a time, I did
this on a partitioned table with only millions of rows when I saw
what direction it was going in.

As my data was partitioned by time the system had to run without some
of the older data for a while while my script altered and re-inherited
each partition.

--
⚂⚃ 100% natural

В списке pgsql-general по дате отправления:

Предыдущее
От: Jasen Betts
Дата:
Сообщение: Re: efficient trigger function selection?
Следующее
От: Jasen Betts
Дата:
Сообщение: Re: Writing data to a text file based on a trigger event...