Search Postgresql Archives

Re: Naming functions with reserved words

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

 



Scott Bailey <artacus@xxxxxxxxxxx> writes:
> I noticed in the temporal project they used reserved words for their 
> functions (union, intersect, etc)

Uh, what project is that exactly, and was it even working within
Postgres?

> But when I try to create a function like that I get an error and I have 
> to quote it both when creating the function and when calling it. The 
> only difference I can see is they their functions are written in C and 
> mine are in SQL. But that doesn't make sense why you could do it in one 
> language and not in another.

You can't do it in any language in Postgres.  UNION and INTERSECT are
fully reserved keywords, and there just isn't any sane way to avoid
making them so given the restrictions of a LALR(1) parser.

			regards, tom lane

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[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