| From: | Matthew Kirkwood <matthew(at)hairy(dot)beasts(dot)org> | 
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> | 
| Cc: | Peter Eisentraut <peter_e(at)gmx(dot)net>, Rod Taylor <pg(at)rbt(dot)ca>, Dennis Bjorklund <db(at)zigo(dot)dhs(dot)org>, elein <elein(at)varlena(dot)com>, Greg Stark <gsstark(at)mit(dot)edu>, PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org> | 
| Subject: | Re: Named arguments in function calls | 
| Date: | 2004-01-26 18:00:58 | 
| Message-ID: | Pine.LNX.4.58.0401261758080.20230@sphinx.mythic-beasts.com | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-hackers | 
On Mon, 26 Jan 2004, Tom Lane wrote:
> >> If that was IS, then foo(x is 13) makes sense.
>
> > I like that syntax.  For example
> > select interest(amount is 500.00, rate is 1.3)
> > is very readable, yet brief.
>
> On second thought though, it doesn't work.
>
> 	select func(x is null);
>
> is ambiguous, especially if func() accepts boolean.
You're unlikely to care, but Oracle's syntax is Perlish:
select interest(amount => 500.0, rate => 1.3);
That'd be ambiguous again, though. Perhaps:
select interest(amount := 500.0, rate := 1.3);
?
Matthew.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Bruce Momjian | 2004-01-26 18:04:12 | Re: Disaster! | 
| Previous Message | Bruce Momjian | 2004-01-26 17:53:02 | Re: 7.5 change documentation |