Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dvaz2-00007q-Pq for pgsql-bugs@arkaria.postgresql.org; Sat, 23 Sep 2017 03:20:00 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dvaz1-0001mk-SG for pgsql-bugs@arkaria.postgresql.org; Sat, 23 Sep 2017 03:19:59 +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 1dvaz1-0001mY-HY; Sat, 23 Sep 2017 03:19:59 +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 1dvayz-0006ef-3x; Sat, 23 Sep 2017 03:19:59 +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 v8N3JqXo028969; Fri, 22 Sep 2017 23:19:52 -0400 From: Tom Lane To: Andrew Dunstan cc: balazs@obiserver.hu, pgsql-bugs@postgresql.org, pgsql-hackers@postgresql.org Subject: Re: BUG #14825: enum type: unsafe use? In-reply-to: <3cece400-af56-7145-2e65-f044de1b0b68@2ndQuadrant.com> References: <20170922185904.1448.16585@wrigleys.postgresql.org> <15165.1506116768@sss.pgh.pa.us> <3cece400-af56-7145-2e65-f044de1b0b68@2ndQuadrant.com> Comments: In-reply-to Andrew Dunstan message dated "Fri, 22 Sep 2017 21:27:29 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <28967.1506136792.1@sss.pgh.pa.us> Date: Fri, 22 Sep 2017 23:19:52 -0400 Message-ID: <28968.1506136792@sss.pgh.pa.us> 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 Andrew Dunstan writes: > On 09/22/2017 05:46 PM, Tom Lane wrote: >> I'm not sure if that qualifies as a stop-ship problem, but it ain't >> good, for sure. We need to look at whether we should revert 15bc038f9 >> or somehow revise its rules. > I wonder if we wouldn't be better > doing this more directly, keeping a per-transaction hash of unsafe enum > values (which will almost always be empty). It might even speed up the > check. Yeah, I was considering the same thing over dinner, though I'd phrase it oppositely: keep a list of enum type OIDs created in the current transaction, so that we could whitelist them. This could maybe become a problem if someone created a zillion enums in one xact, though. The immediate question is do we care to design/implement such a thing post-RC1. I'd have to vote "no". I think the most prudent thing to do is revert 15bc038f9 and then have another go at it during the v11 cycle. regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs