Re: WIP: default values for function parameters

From: Dimitri Fontaine <dfontaine(at)hi-media(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org, Michael Meskes <meskes(at)postgresql(dot)org>, "David E(dot) Wheeler" <david(at)kineticode(dot)com>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, Bruce Momjian <bruce(at)momjian(dot)us>, Gregory Stark <stark(at)enterprisedb(dot)com>, Grzegorz Jaskiewicz <gj(at)pointblue(dot)com(dot)pl>
Subject: Re: WIP: default values for function parameters
Date: 2008-12-13 21:20:32
Message-ID: E50DB169-4A85-4196-88D6-7F193574AFF6@hi-media.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Le 13 déc. 08 à 17:05, Tom Lane a écrit :
> I personally agree that AS seems more SQL-ish, but that's in the eye
> of the beholder.

So do I, but I fear it's already taken for another meaning.

> The argument about ambiguity in XMLELEMENT is bogus becase XMLELEMENT
> doesn't (and won't) have named parameters.

My concern is the other way around. This function provides support for
arguments relabeling, but reading some other threads here I think we
don't yet support this feature for user defined function. Or maybe
only for C-language user defined functions.

What if relabeling support were to spread some more?
My point is that we couldn't offer generalization of an existing
feature if we reuse AS for default parameter value. Or the user would
have to choose between having more than one argument with a default
value and relabeling support. That would be awkward.

No it could very well be that the point does not exists, but someone
would have to explain why to me, cause I'm sure not getting it by
myself...

Regards,
- --
dim

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Darwin)

iEYEARECAAYFAklEJyEACgkQlBXRlnbh1bmlgwCfW8PPDh1rIH6Fk/3oEQ0t1+TH
vDYAni0kE4us/AvWuI6HTyaywAgP9Tga
=jB1l
-----END PGP SIGNATURE-----

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Markus Wanner 2008-12-13 21:21:37 Re: Sync Rep: First Thoughts on Code
Previous Message Markus Wanner 2008-12-13 20:57:21 Re: Sync Rep: First Thoughts on Code