Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ajpBL-0006KC-0W for pgsql-hackers@arkaria.postgresql.org; Sat, 26 Mar 2016 14:27:15 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1ajpBK-0005jg-JQ for pgsql-hackers@arkaria.postgresql.org; Sat, 26 Mar 2016 14:27:14 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ajpA0-0004GE-Dx for pgsql-hackers@postgresql.org; Sat, 26 Mar 2016 14:25:52 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ajp9t-0007tX-Pp for pgsql-hackers@postgresql.org; Sat, 26 Mar 2016 14:25:51 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id u2QEPf19003203; Sat, 26 Mar 2016 10:25:41 -0400 From: Tom Lane To: Andrew Dunstan cc: "David G. Johnston" , Matthias Kurz , Jim Nasby , "pgsql-hackers@postgresql.org" Subject: Re: Alter or rename enum value In-reply-to: <56F6827F.9040104@dunslane.net> References: <56E049CC.8010201@dunslane.net> <25605.1457539654@sss.pgh.pa.us> <56E05635.70908@dunslane.net> <28167.1457543612@sss.pgh.pa.us> <56F49CF8.8050007@BlueTreble.com> <27476.1458876456@sss.pgh.pa.us> <56F58876.6020508@dunslane.net> <56F6827F.9040104@dunslane.net> Comments: In-reply-to Andrew Dunstan message dated "Sat, 26 Mar 2016 08:37:19 -0400" Date: Sat, 26 Mar 2016 10:25:41 -0400 Message-ID: <3202.1459002341@sss.pgh.pa.us> X-Pg-Spam-Score: -2.9 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Andrew Dunstan writes: > We don't have the luxury of being able to redesign this as a green > fields development. I'm not actually convinced that we need to do anything. SQL already has a perfectly good mechanism for enforcing that a column contains only values of a mutable set defined in another table --- it's called a foreign key. The point of inventing enums was to provide a lower-overhead solution for cases where the allowed value set is *not* mutable. So okay, if we can allow certain cases of changing the value set without increasing the overhead, great. But when we can't do it without adding a whole lot of complexity and overhead (and, no doubt, bugs), we need to just say no. Maybe the docs about enums need to be a little more explicit about pointing out this tradeoff. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers