Re: plpgsql keywords are hidden reserved words

From: Gregory Stark <stark(at)enterprisedb(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: plpgsql keywords are hidden reserved words
Date: 2007-11-05 15:55:43
Message-ID: 87ejf4660w.fsf@oxford.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


"Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)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!

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2007-11-05 16:01:26 Re: Slow regression tests on windows
Previous Message Heikki Linnakangas 2007-11-05 15:38:54 Re: Fwd: Clarification about HOT