Re: WIP: Allow SQL-language functions to reference parameters by parameter name - Mailing list pgsql-hackers

From Tom Lane
Subject Re: WIP: Allow SQL-language functions to reference parameters by parameter name
Date
Msg-id 28741.1301109822@sss.pgh.pa.us
Whole thread Raw
In response to Re: WIP: Allow SQL-language functions to reference parameters by parameter name  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: WIP: Allow SQL-language functions to reference parameters by parameter name
Re: WIP: Allow SQL-language functions to reference parameters by parameter name
List pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> As I've said before, I believe that the root cause of this problem is
> that using the same syntax for variables and column names is a bad
> idea in the first place.  If we used $foo or ?foo or ${foo} or $.foo
> or &&foo!!$#? to mean "the parameter called foo", then this would all
> be a non-issue.

If this were PL/perl, or PL/almost-anything-except-SQL, I could get
behind such a proposal.  But it's not, it's SQL; and SQL doesn't do
things that way.  SQL's idea of disambiguation is qualified names.

And even more to the point: to the extent you think that weird syntax
might be a suitable solution, you have to keep in mind that the SQL
committee could take over any such syntax at the drop of a hat.
See the recent unpleasantness concerning => ...
        regards, tom lane


pgsql-hackers by date:

Previous
From: "David E. Wheeler"
Date:
Subject: Re: WIP: Allow SQL-language functions to reference parameters by parameter name
Next
From: Darren Duncan
Date:
Subject: resolving SQL ambiguity (was Re: WIP: Allow SQL-lang funcs to ref params by param name)