Re: named parameters in SQL functions - Mailing list pgsql-hackers

From Tom Lane
Subject Re: named parameters in SQL functions
Date
Msg-id 29780.1258340651@sss.pgh.pa.us
Whole thread Raw
In response to Re: named parameters in SQL functions  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers
Andrew Dunstan <andrew@dunslane.net> writes:
> Robert Haas wrote:
>> Well that is the tricky part, for sure.  I would personally prefer
>> something like ${name} rather than a prefix, but I think you're likely
>> to veto that outright.  So, anything reasonably short would be an
>> improvement over the status quo.  self?  this?  my?
>> 
> I think it would have to be a reserved word. The obvious existing 
> keyword to use is "function" but unless I'm mistaken we'd need to move 
> it from unreserved keyword to reserved, and I'm not sure this would 
> justify that.

All of these are fundamentally illegal syntax, which as was already
pointed out up-thread is likely to introduce nasty side-effects of its
own.  Not to mention being an order of magnitude harder to implement.
We have a hook to implement resolving a ColumnRef, ie a qualified
identifier.  We don't have support for random other things.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: named parameters in SQL functions
Next
From: Tom Lane
Date:
Subject: Re: named parameters in SQL functions