Re: [BUGS] BUG #14825: enum type: unsafe use? - Mailing list pgsql-bugs

From Tom Lane
Subject Re: [BUGS] BUG #14825: enum type: unsafe use?
Date
Msg-id 28968.1506136792@sss.pgh.pa.us
Whole thread Raw
In response to Re: [BUGS] BUG #14825: enum type: unsafe use?  (Andrew Dunstan <andrew.dunstan@2ndquadrant.com>)
Responses Re: [BUGS] BUG #14825: enum type: unsafe use?
List pgsql-bugs
Andrew Dunstan <andrew.dunstan@2ndquadrant.com> 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

pgsql-bugs by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: [BUGS] Multiple evaluation of single reference to function without parameters
Next
From: Andrew Dunstan
Date:
Subject: Re: [BUGS] BUG #14825: enum type: unsafe use?