Search Postgresql Archives

Re: ENUM drop label workaround

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Sep 27, 2013 at 1:37 AM, Arjen Nienhuis <a.g.nienhuis@xxxxxxxxx> wrote:
>> Are there any caveats of this solution and may be there is a better one?
>
> Why don't you just create a new ENUM with fewer values? You can use:
> ALTER TABLE ... SET DATA TYPE ... USING col1::text::new_enum_type;
> You might need to recreate some foreign keys.

We will have a lot of big tables with such fields and we couldn't
afford downtime on the ALTERs and other things.

-- 
Kind regards,
Sergey Konoplev
PostgreSQL Consultant and DBA

http://www.linkedin.com/in/grayhemp
+1 (415) 867-9984, +7 (901) 903-0499, +7 (988) 888-1979
gray.ru@xxxxxxxxx


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux