| От | Tom Lane |
|---|---|
| Тема | Re: Naming functions with reserved words |
| Дата | |
| Msg-id | 26649.1245250807@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Naming functions with reserved words (Scott Bailey <artacus@comcast.net>) |
| Список | pgsql-general |
Scott Bailey <artacus@comcast.net> 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
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера