Re: help with bison

From: Bear Giles <bgiles(at)coyotesong(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Bear Giles <bgiles(at)coyotesong(dot)com>, Neil Conway <nconway(at)klamath(dot)dyndns(dot)org>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: help with bison
Date: 2002-04-11 03:52:06
Message-ID: 200204110352.VAA16612@eris.coyotesong.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> > 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Hiroshi Inoue 2002-04-11 04:01:37 Re: RFC: Restructuring pg_aggregate
Previous Message Tom Lane 2002-04-11 03:24:08 Re: help with bison