On 3/28/16 4:42 AM, Emre Hasegeli wrote:
> Now, we are using a
> function to replace an enum type on all tables with another one, but
> we are not at all happy with this solution. It requires all objects
> which were using the enum to be dropped and recreated, and it rewrites
> the tables, so it greatly increases the migration time and effort.
FWIW, there are ways to avoid some of that pain by having a trigger
maintain the new column on INSERT/UPDATE and then slowly touching all
the old rows where the new column is NULL.
Obviously would be much better if we could just do this with ENUMs...
--
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com