Re: Current enums patch - Mailing list pgsql-patches

From Tom Lane
Subject Re: Current enums patch
Date
Msg-id 26697.1175541886@sss.pgh.pa.us
Whole thread Raw
In response to Re: Current enums patch  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: Current enums patch  (Tom Dunstan <pgsql@tomd.cc>)
List pgsql-patches
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

pgsql-patches by date:

Previous
From: Dave Page
Date:
Subject: Re: Blocked post
Next
From: Andrew Dunstan
Date:
Subject: Re: Current enums patch