From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Tim Hart <tjhart(at)mac(dot)com> |
Cc: | Chris <dmagick(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: Question about the enum type |
Date: | 2008-02-18 05:21:06 |
Message-ID: | 7166.1203312066@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Tim Hart <tjhart(at)mac(dot)com> writes:
> On Feb 17, 2008, at 10:41 PM, Chris wrote:
> It's a string manipulation function:
> http://www.postgresql.org/docs/8.3/interactive/functions-string.html
> If the issue were simply that it were a function name, than I would
> have expected that attempting to create an enum type of 'abs' to also
> result in a quoted type.
The reason "position" is special is that the SQL spec calls out weird
specialized syntax for it:
<string position expression> ::=
POSITION <left paren> <string value expression>
IN <string value expression> <right paren>
There's no way to handle this random use of IN rather than comma,
except by having a specialized grammar production, which requires
POSITION to be a keyword.
In contrast, "abs" isn't a keyword at all in Postgres' eyes --- it's
just a function that happens to appear in the system catalogs.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Keaton Adams | 2008-02-18 05:22:33 | Re: Why isn't an index being used when selecting a distinct value? |
Previous Message | Tim Hart | 2008-02-18 04:55:46 | Re: Question about the enum type |