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

From Tom Lane
Subject Re: plpgsql keywords are hidden reserved words
Date
Msg-id 23353.1194286039@sss.pgh.pa.us
Whole thread Raw
In response to plpgsql keywords are hidden reserved words  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
John DeSoi <desoi@pgedit.com> writes:
> Is there any feasibility to the idea of allowing pl/pgsql variables  
> and parameters to be prefixed with a special character like '$'?

I find this (a) really ugly, (b) incompatible with Oracle, which
you'll recall is one of the main driving ideas for plpgsql, and
(c) almost certainly a lexical conflict with dollar quoting.

Most other special characters you might suggest would create
parsing ambiguities too.

> I'm constantly adding prefixes like 'v_' because of conflicts with table  
> or column names.

The reason you have to do that is that we got the lookup order backward:
per Oracle, column names within a query should bind more tightly than
plpgsql variable names, and if you need to disambiguate you qualify
the variables.  We should fix that instead of bogotifying the syntax.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: plpgsql keywords are hidden reserved words
Next
From: Zdenek Kotala
Date:
Subject: Is necessary to use SEQ_MAXVALUE in pg_dump?