From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Michael Fuhr <mike(at)fuhr(dot)org> |
Cc: | John DeSoi <desoi(at)pgedit(dot)com>, pgsql-hackers(at)postgreSQL(dot)org |
Subject: | Re: [SQL] info is a reserved word? |
Date: | 2006-01-13 05:10:29 |
Message-ID: | 21658.1137129029@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-sql |
[ moved to -hackers ]
Michael Fuhr <mike(at)fuhr(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | kevin brintnall | 2006-01-13 09:37:32 | GRANT/REVOKE column-level privileges |
Previous Message | Michael Fuhr | 2006-01-13 04:57:56 | Re: info is a reserved word? |
From | Date | Subject | |
---|---|---|---|
Next Message | Adam Rosi-Kessel | 2006-01-13 14:32:50 | ORDER BY does not work as expected with multiple joins |
Previous Message | Michael Fuhr | 2006-01-13 04:57:56 | Re: info is a reserved word? |