Re: plpgsql keywords are hidden reserved words - Mailing list pgsql-hackers

From Gregory Stark
Subject Re: plpgsql keywords are hidden reserved words
Date
Msg-id 87ejf4660w.fsf@oxford.xeocode.com
Whole thread Raw
In response to plpgsql keywords are hidden reserved words  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: plpgsql keywords are hidden reserved words  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
"Tom Lane" <tgl@sss.pgh.pa.us> writes:

> I was somewhat bemused just now to find that this function stopped
> working:
>
> regression=# create function estimate_rows(query text) returns float8 as $$
...
> This works fine in 8.2.  The reason it no longer works is that "query"
> is now a special token in the plpgsql lexer, and that means that it will
> never be substituted for by read_sql_construct().  So it's effectively
> a reserved word.

Perhaps we should be throwing a more intelligible error if you have a
parameter (or variable?) named in a way that will conflict?

--  Gregory Stark EnterpriseDB          http://www.enterprisedb.com Ask me about EnterpriseDB's Slony Replication
support!


pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: Fwd: Clarification about HOT
Next
From: Andrew Dunstan
Date:
Subject: Re: Slow regression tests on windows