Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dwEWe-0008PZ-4Z for pgsql-bugs@arkaria.postgresql.org; Sun, 24 Sep 2017 21:33:20 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dwEWd-0000VI-MW for pgsql-bugs@arkaria.postgresql.org; Sun, 24 Sep 2017 21:33:19 +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 1dwEVv-0006e5-3g for pgsql-bugs@postgresql.org; Sun, 24 Sep 2017 21:32:35 +0000 Received: from mail-yw0-x236.google.com ([2607:f8b0:4002:c05::236]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1dwEVs-0004fB-2B for pgsql-bugs@postgresql.org; Sun, 24 Sep 2017 21:32:33 +0000 Received: by mail-yw0-x236.google.com with SMTP id s62so3591532ywg.0 for ; Sun, 24 Sep 2017 14:32:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=from:subject:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=PSAJGZoGZL4XStI7EvH8M/BCz5pYlNGWhGpq2y2t8gM=; b=puH3AUg9kjE0z4UWPraJXdBgf+93ECnEnHG23JFVdKEOT58+nFG0frfQQ2lMIJu9/z 6/us/mGqUWWjAIqdXVtLyp/RVWzbTShOG39nEoNO/yaA7GDSj1SdEutKvTOwAakDHsvy /CoJLrFzAMZWfNyRWSBqSsZNOGSjPK9lonRjkLr2eOLFAC7yz5NHrGipcz5AFas5AOSU yDjcJoNBnO1D/ztT4j5gX/9d4cm98aovy/v39JwJcsVLz3Hf0GJr4wrZCXWUiTByiqoA seNKS4wnKsRF/aEkS6RN1Oat2mC07p9xEekxGhd/VYlk3enuTh5JEhT7QrcWSMnovl+F u8mw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=PSAJGZoGZL4XStI7EvH8M/BCz5pYlNGWhGpq2y2t8gM=; b=KeeXj1/bYVb3sh9Ixxti4aEdUH1GKaXKkod2O+CbBmIuu98PSPMCDRiOOiMbzH8buH b0Au5MnzWXtbUB7V7iWqkO1ZtRIY5rK7rBMyo1/Jf8Pbot10ijW5Ed2aYmjsEpo6igxX gGXpG5z1teQYS7dIWQjxSmIgtxHMpEYp6DmBYRIDWOUY5FfVg0x9ukqcUdQJQ5NFyOiD dhAEd1PEEY037DAbESyF6KBh22bujbGt0rsvxmSdqCk04ZNJuxRnT+/NMKtwx5yxRFYE 5K6b9ctMBMvgnjZlBPCEO5/52JhnfUv375sOkAEq0Q1ZNpwWDeGTcKIZkevLNG5mQsz2 MDgw== X-Gm-Message-State: AHPjjUg3NKu3h6OABcDo2nQduL608zKanmKE5aJWyfeiM/vjQHIZ61+d sO2Iv6EU/IEqUE3G77zPOx7T X-Google-Smtp-Source: AOwi7QCoZntyCFOP9mOIp7bFit2TGk7axCC6c46IiBMUg8qAkICiD1ugS+KTD5oAyPsyEXa1A03XHQ== X-Received: by 10.37.95.80 with SMTP id h16mr3487391ybm.89.1506288751163; Sun, 24 Sep 2017 14:32:31 -0700 (PDT) Received: from [192.168.10.146] ([98.122.175.38]) by smtp.gmail.com with ESMTPSA id v76sm2107899ywe.6.2017.09.24.14.32.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 24 Sep 2017 14:32:30 -0700 (PDT) From: Andrew Dunstan X-Google-Original-From: Andrew Dunstan Subject: Re: BUG #14825: enum type: unsafe use? To: Tom Lane Cc: balazs@obiserver.hu, pgsql-bugs@postgresql.org, pgsql-hackers@postgresql.org References: <20170922185904.1448.16585@wrigleys.postgresql.org> <15165.1506116768@sss.pgh.pa.us> <3cece400-af56-7145-2e65-f044de1b0b68@2ndQuadrant.com> <28968.1506136792@sss.pgh.pa.us> <24380.1506179805@sss.pgh.pa.us> <16272.1506189656@sss.pgh.pa.us> <928f5974-151f-0273-0221-fac213e7624f@2ndQuadrant.com> <19137.1506196325@sss.pgh.pa.us> <4942e2c0-3302-f496-d4c1-a967f77d0143@2ndQuadrant.com> <25662.1506204381@sss.pgh.pa.us> <9479302a-09b8-4264-f9c4-514b65f18547@2ndQuadrant.com> <18127.1506285450@sss.pgh.pa.us> Message-ID: <2770f70a-5977-3fa1-1065-11b4cc69f07f@2ndQuadrant.com> Date: Sun, 24 Sep 2017 17:32:29 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <18127.1506285450@sss.pgh.pa.us> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-MW List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org On 09/24/2017 04:37 PM, Tom Lane wrote: > Andrew Dunstan writes: >> OK, here's the finished patch. It has a pretty small footprint all >> things considered, and I think it guarantees that nothing that could be >> done in this area in 9.6 will be forbidden. That's probably enough to >> get us to 10 without having to revert the whole thing, ISTM, and we can >> leave any further refinement to the next release. > I think this could do with some more work on the comments and test cases, > but it's basically sound. > > What we still need to debate is whether to remove the heuristic > type-is-from-same-transaction test, making the user-visible behavior > simply "you must commit an ALTER TYPE ADD VALUE before you can use the > new value". I'm kind of inclined to do so; the fuzzy (and inadequately > documented) behavior we'll have if we keep it doesn't seem very nice to > me. > > I'd rather not. The failure cases are going to be vanishingly small, I suspect, and we've already discussed how we might improve that test. If you want to put some weasel words in the docs that might be ok. cheers andrew -- Andrew Dunstan https://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs