Search Postgresql Archives

Re: Question about the enum type

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Tim Hart <tjhart@xxxxxxx> 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

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
       subscribe-nomail command to majordomo@xxxxxxxxxxxxxx so that your
       message can get through to the mailing list cleanly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux