Re: Calling PL functions with named parameters

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Josh Berkus <josh(at)agliodbs(dot)com>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org, David Fetter <david(at)fetter(dot)org>
Subject: Re: Calling PL functions with named parameters
Date: 2004-08-16 16:51:21
Message-ID: 14761.1092675081@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Josh Berkus <josh(at)agliodbs(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2004-08-16 16:59:53 Re: Open items
Previous Message Josh Berkus 2004-08-16 16:43:28 Re: Calling PL functions with named parameters