> 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);
>
> No doubt I'm missing something…
I'd just like to mention that there are two different cases to
consider here. One is when you want to pass some optional parameters,
but there are enough of them that it's inconvenient to have them in
some particular order. This is the case I think you're primarily
catering to here.
The other is when you want the function that gets called to magically
know what name the system would have assigned to the column had the
expression been used in a select list, so that you can write things
xmlify(foo) and get <foo>...data from foo...</foo>.
I think the AS syntax makes a lot of sense for the second one, but not
so much for the first one. Maybe we need both:
[keyword:] paramater_expression [AS label]
...Robert