Re: Current enums patch

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Tom Dunstan <pgsql(at)tomd(dot)cc>, Heikki Linnakangas <heikki(at)enterprisedb(dot)com>, pgsql-patches(at)postgresql(dot)org
Subject: Re: Current enums patch
Date: 2007-04-02 19:24:46
Message-ID: 26697.1175541886@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Andrew Dunstan <andrew(at)dunslane(dot)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

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Andrew Dunstan 2007-04-02 19:31:22 Re: Current enums patch
Previous Message Dave Page 2007-04-02 19:21:31 Re: Blocked post