Re: Calling PL functions with named parameters - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Calling PL functions with named parameters
Date
Msg-id 14761.1092675081@sss.pgh.pa.us
Whole thread Raw
In response to Re: Calling PL functions with named parameters  (Josh Berkus <josh@agliodbs.com>)
Responses Re: Calling PL functions with named parameters
List pgsql-hackers
Josh Berkus <josh@agliodbs.com> writes:
> Tom, just to be perfectly clear about why I see Procedures as a way of 
> resolving parameter ambiguity, my idea is that:
> FUNCTIONS will support overloading but will not support named parameter 
> calling;
> PROCEDURES will support named parameter calling but not support overloading.

Understood, but this seems like a bad design to me, because it's
non-orthogonal.

> Particularly, I'm concerned about adding any more code to the
> evaluation of a function call, out of fear that it will have a
> significant performance impact due to increased time to evaluate
> built-in functions.

I think that named params would have no significant extra cost *when not
used*, so I'm not sure the above concern is a big deal.  (I do worry
about the cost implications of defaultable parameters, however, as that
seems likely to expand the search space for a matching function quite a
bit.)
        regards, tom lane


pgsql-hackers by date:

Previous
From: Josh Berkus
Date:
Subject: Re: Calling PL functions with named parameters
Next
From: "Magnus Hagander"
Date:
Subject: Re: Open items