Re: help with bison

Поиск
Список
Период
Сортировка
Искать
От
Bear Giles
Тема
Re: help with bison
Дата
Msg-id
200204110352.VAA16612@eris.coyotesong.com
Ответ на
Список
Дерево обсуждения
Re: help with bison Joe Conway <mail@joeconway.com>
> > As an aside, is there any reason to treat TEMP and TEMPORARY as two
> > separate identifiers?
> 
> Yes: if the lexer folds them together then unreserved_keyword can't
> regenerate the equivalent name properly.

But if they're synonyms, is that necessary?  I'm not indifferent to the
benefits of being able to recreate an input string exactly when all other
things are equal, but things aren't equal here.  TEMPORARY is a SQL92
keyword, TEMP is described as a "Keyword for Postgres support," but the
grammar shows that one never appears without the other.

So why not deprecate TEMP and always show TEMPORARY when reconstructing
the query?

> You might be right that the grammar could benefit from some refactoring,
> though I'm not at all sure if that really helps from an
> execution-efficiency (number of states) standpoint.

The goal of the refactoring wouldn't be execution efficiency, it would 
be simplifying maintenance of the grammar.  And it looks like it's the
common practice elsewhere, just not in the OptTemp and OptTempTableName
rules.

Bear

В списке pgsql-hackers по дате отправления
От: Tom Lane
Дата:
Сообщение: Re: help with bison
От: Hiroshi Inoue
Дата:
FAQ