Re: WIP: default values for function parameters - Mailing list pgsql-hackers

From Tom Lane
Subject Re: WIP: default values for function parameters
Date
Msg-id 4301.1229089154@sss.pgh.pa.us
Whole thread Raw
In response to Re: WIP: default values for function parameters  ("David E. Wheeler" <david@kineticode.com>)
Responses Re: WIP: default values for function parameters  ("David E. Wheeler" <david@kineticode.com>)
List pgsql-hackers
"David E. Wheeler" <david@kineticode.com> writes:
> As a Perl hacker, I'm strongly biased toward =>, but I guess AS isn't  
> *too* bad. At least it's the same number of characters. Is -> right out?

It's just as bad as => from the perspective of usurping a probable
user-defined operator name.

I think the fundamental problem with *any* notation like that is that
we don't have a concept of reserved words in the operator name space;
and without a precedent for it it's tough to justify suddenly breaking
people's code.  As was already noted, you could damp down the objections
by choosing some long and ugly operator name, but that's hardly going
to be pleasant to use.

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.
        regards, tom lane


pgsql-hackers by date:

Previous
From: "Pavel Stehule"
Date:
Subject: Re: WIP: default values for function parameters
Next
From: Alvaro Herrera
Date:
Subject: Re: PostgreSQL 8.3.4 reproducible crash