Re: WIP: default values for function parameters

From: "Rod Taylor" <rod(dot)taylor(at)gmail(dot)com>
To: "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com>
Cc: "David E(dot) Wheeler" <david(at)kineticode(dot)com>, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Bruce Momjian" <bruce(at)momjian(dot)us>, "Gregory Stark" <stark(at)enterprisedb(dot)com>, "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 14:00:52
Message-ID: 751261b20812120600o3a1f8280j2c5425fa95ab36e7@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

How about IS or INTO?

param_name IS 3
param_name IS 'some string value'

3 INTO param_name
'some string value' INTO param_name

On Fri, Dec 12, 2008 at 8:47 AM, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> wrote:
> 2008/12/12 David E. Wheeler <david(at)kineticode(dot)com>:
>> On Dec 12, 2008, at 2:39 PM, Tom Lane wrote:
>>
>>> So I think that really this is never going to fly unless it uses a
>>> keyword-looking reserved word. And we're not going to take some short
>>> word that's not reserved now and suddenly make it so. So, despite
>>> Pavel's objection that the AS syntax proposal might be confused with
>>> other uses of AS, I seriously doubt that any proposal is going to get
>>> accepted that doesn't recycle AS or some other existing reserved word.
>
> when I should exactly identify param name, the we should to use any symbols.
>
>>
>> I'm okay with AS if that's the way it has to be, but what about a colon
>> right at the end of the label? A cast is two colons, so no conflict there:
>>
>> SELECT foo(1, name: 'bar', quantity: 10);
>
> it's look well, but I still prefer some combination with =
>
> name: = ''
> name: => '''
> :name = ''
> $name => ..
> $name = ..
>
> Maybe I am too conservative
> Pavel
>
>>
>> No doubt I'm missing something…
>>
>> Best
>>
>> David
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2008-12-12 14:01:49 Re: PostgreSQL 8.3.4 reproducible crash
Previous Message Martin Pihlak 2008-12-12 13:59:51 Re: SQL/MED compatible connection manager