From: Tom Lane <tgl@sss.pgh.pa.us>
To: Michael Fuhr <mike@fuhr.org>
Cc: John DeSoi <desoi@pgedit.com>
Cc: pgsql-hackers@postgreSQL.org
Subject: Re: [SQL] info is a reserved word?
Date: Fri, 13 Jan 2006 00:10:29 -0500
Message-ID: <21658.1137129029@sss.pgh.pa.us> (raw)
In-Reply-To: <20060113045756.GA88336@winnie.fuhr.org>
References: <304B868D-CE4E-4E43-8B85-4CA238BB0F94@pgedit.com>
<20060113012932.GA71559@winnie.fuhr.org>
<21184.1137126088@sss.pgh.pa.us>
<20060113045756.GA88336@winnie.fuhr.org>
[ moved to -hackers ]
Michael Fuhr <mike@fuhr.org> writes:
> On Thu, Jan 12, 2006 at 11:21:28PM -0500, Tom Lane wrote:
>> plpgsql is not very good about reserving words "minimally", ie, not
>> treating a word as a keyword outside the context where the keyword
>> is meaningful.
>>
>> This could probably be fixed, or at least greatly reduced, with some
>> flex/bison hacking. Anyone up for it?
> Possibly. Would it involve much more than what the main parser's
> grammar does with unreserved_keyword and friends? I suppose this
> ought to move to pgsql-hackers.
The keyword-classification tactic would be one approach. For the
specific case of the RAISE severity codes, I'd be inclined to eliminate
all those "keywords" entirely and let them be lexed/parsed as simple
identifiers --- there's no strong reason not to do strcmp's for specific
identifiers at the point where we're building a raise_level value.
There are probably some other methods that might apply in other places.
But in any case it's a fairly self-contained problem; you don't need
any vast knowledge of Postgres internals to tackle it, just some
understanding of the flex and bison tools.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: tgl@sss.pgh.pa.us, mike@fuhr.org, desoi@pgedit.com, pgsql-hackers@postgreSQL.org
Subject: Re: [SQL] info is a reserved word?
In-Reply-To: <21658.1137129029@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox