Andrew Dunstan <andrew@dunslane.net> writes:
> Tom Lane wrote:
>> While all this reasoning is perfectly OK on its own terms, it ignores
>> the precedents of SQL identifier handling. Maybe we should revisit the
>> question of whether the labels are identifiers.
> If we do that can we still cache the values in the syscache?
Sure, as long as we're storing them as "name" it's not a problem.
But probably making them act like identifiers is not a good idea,
because I doubt we want automatic downcasing in enum_in. People
wouldn't be happy if they had to write WHERE color = '"Red"' or
something like that to get at a mixed-case enum label. Let's
just throw the error instead. (I agree that enum_in can just fail
with "no such label", but CREATE TYPE ought to give a specific
error about it.)
regards, tom lane