Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bj5qo-0006JZ-NA for pgsql-hackers@arkaria.postgresql.org; Sun, 11 Sep 2016 14:35:18 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bj5qo-0003EP-4w for pgsql-hackers@arkaria.postgresql.org; Sun, 11 Sep 2016 14:35:18 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bj5qn-0003E7-FW for pgsql-hackers@postgresql.org; Sun, 11 Sep 2016 14:35:17 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bj5qk-0004Dc-NC for pgsql-hackers@postgresql.org; Sun, 11 Sep 2016 14:35:16 +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 u8BEYv1b023104; Sun, 11 Sep 2016 10:34:57 -0400 From: Tom Lane To: Jim Nasby cc: emre@hasegeli.com, Matthias Kurz , =?UTF-8?Q?Dagfinn_Ilmari_Manns=c3=a5ker?= , Andrew Dunstan , Robert Haas , PostgreSQL Hackers , "David G. Johnston" Subject: Re: [PATCH] Alter or rename enum value In-reply-to: References: <26875.1472935684@sss.pgh.pa.us> <32710.1473099022@sss.pgh.pa.us> <8384.1473186627@sss.pgh.pa.us> <9dd58b5f-0447-54fe-02f4-afb62fd7c3c8@dunslane.net> <17893.1473193170@sss.pgh.pa.us> <30073.1473279258@sss.pgh.pa.us> Comments: In-reply-to Jim Nasby message dated "Sat, 10 Sep 2016 22:05:58 -0500" Date: Sun, 11 Sep 2016 10:34:57 -0400 Message-ID: <23103.1473604497@sss.pgh.pa.us> X-Pg-Spam-Score: -4.1 (----) 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 Jim Nasby writes: > On 9/8/16 4:55 AM, Emre Hasegeli wrote: >> The main problem that has been discussed before was the indexes. One >> way is to tackle with it is to reindex all the tables after the >> operation. Currently we are doing it when the datatype of indexed >> columns change. So it should be possible, but very expensive. > Why not just disallow dropping a value that's still in use? That's > certainly what I would prefer to happen by default... Even ignoring the hidden-values-in-indexes problem, how would you discover that it's still in use? Not to mention preventing new insertions after you look? 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