Re: WIP: default values for function parameters

From: Dimitri Fontaine <dfontaine(at)hi-media(dot)com>
To: Gregory Stark <stark(at)enterprisedb(dot)com>
Cc: "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com>, "Heikki Linnakangas" <heikki(dot)linnakangas(at)enterprisedb(dot)com>, "David E(dot) Wheeler" <david(at)kineticode(dot)com>, "Bruce Momjian" <bruce(at)momjian(dot)us>, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Grzegorz Jaskiewicz" <gj(at)pointblue(dot)com(dot)pl>, "PostgreSQL Hackers" <pgsql-hackers(at)postgresql(dot)org>, "Peter Eisentraut" <peter_e(at)gmx(dot)net>
Subject: Re: WIP: default values for function parameters
Date: 2008-12-12 15:11:39
Message-ID: A0508161-569D-4043-ADDA-D0C2CF97DED2@hi-media.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

Le 12 déc. 08 à 15:57, Gregory Stark a écrit :
> These don't solve anything. There's nothing stopping you from
> defining a unary
> prefix operator => or =

That's why I'm preferring the common-lisp syntax of :param value, or
its variant param: value.

> In any case this is all weird. SQL isn't C and doesn't have random
> bits of
> punctuation involved in syntax. It uses whole words for just about
> everything.
> Anything you do using punctuation characters is going to look out of
> place.

Well, with the exception of function argument list, beginning with
( and ending with ) and where parameters are separated by ,. Maybe
some : in there would shock users.

SELECT foo(a, b, c);
SELECT foo(a, :c 5);
SELECT foo(a, c: 5);

Not so much new punctuation characters there, 1 out of 4.
- --
dim

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

iEYEARECAAYFAklCfysACgkQlBXRlnbh1blWJQCfdLCB0B9xOzvfX2tOfoBL4cxo
X4UAoI3aTK+834Cx5Wbly/snj2hQbQTX
=s6w5
-----END PGP SIGNATURE-----

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Stark 2008-12-12 15:31:46 Re: WIP: default values for function parameters
Previous Message Tom Lane 2008-12-12 15:10:57 Re: WIP: default values for function parameters