Re: proposal sql: labeled function params

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com>
Cc: "Hannu Krosing" <hannu(at)2ndquadrant(dot)com>, Decibel! <decibel(at)decibel(dot)org>, "Robert Haas" <robertmhaas(at)gmail(dot)com>, "Bruce Momjian" <bruce(at)momjian(dot)us>, "Peter Eisentraut" <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: proposal sql: labeled function params
Date: 2008-08-24 16:00:01
Message-ID: 23099.1219593601@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com> writes:
> 2008/8/23 Hannu Krosing <hannu(at)2ndquadrant(dot)com>:
>> Why not just use some standard record syntax, like

> do you thing, so is it simpler?

It's not about being "simpler", it's about pointing out that there are
ways to do what you need without creating compatibility problems and
without commandeering syntax that, if we were going to commandeer it,
would be far better used for named params.

IMHO, the use-case for labeled parameters is simply much too narrow
to justify giving them special syntax if there is any possible way
to avoid it. We have now seen a couple of ways to do it without
new syntax, at the cost of a few more lines inside the called function
to examine its arguments. But the use-cases you've suggested involve
functions that are complicated enough that that's not going to be any
big deal.

So I feel that the proposal for labeled parameters as such is dead
in the water, and that the only usefulness this thread has had is
(re-) exploring the syntactic alternatives available for named params.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2008-08-24 16:14:22 Re: What in the world is happening on spoonbill?
Previous Message Joshua D. Drake 2008-08-24 15:49:51 Re: [PATCHES] VACUUM Improvements - WIP Patch