Re: Question about the enum type - Mailing list pgsql-general

From Tim Hart
Subject Re: Question about the enum type
Date
Msg-id a74dcd25564d6ac3e278df431b3ee7d7@mac.com
Whole thread Raw
In response to Re: Question about the enum type  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Question about the enum type
List pgsql-general
On Feb 17, 2008, at 11:21 PM, Tom Lane wrote:

> The reason "position" is special is that the SQL spec calls out weird
> specialized syntax for it:

Given the spec, I completely understand.

Given the roundabout way I discovered the nature of the problem, I'm
curious:

At the time I executed the statement

create type position as enum('pitcher', 'catcher', 'first base',
'second base', 'third base', 'short stop', 'left field', 'center
field', 'right field', 'designated hitter', 'pinch hitter');

Would it have been reasonable to expect some kind of notice or warning
message stating that 'position' was special, and
<double-quote>position<double-quote> would be used instead?

Given the non-trivial list of reserved and non-reserved words, I can
imagine that this situation has risen before - and probably will again.

This is not a rant or a gripe, BTW - I'm poking and prodding this
subject in order to be more well informed.

Tim


pgsql-general by date:

Previous
From: Keaton Adams
Date:
Subject: Re: Why isn't an index being used when selecting a distinct value?
Next
From: Tom Lane
Date:
Subject: Re: Question about the enum type