From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: functional call named notation clashes with SQL feature |
Date: | 2010-05-26 22:52:33 |
Message-ID: | 4BFDA631.7030309@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Peter Eisentraut wrote:
> It turns out that the SQL standard uses the function call notation
>
> foo(this AS that)
>
> for something else:
>
> <routine invocation> ::= <routine name> <SQL argument list>
>
> <routine name> ::= [ <schema name> <period> ] <qualified identifier>
>
> <SQL argument list> ::= <left paren> [ <SQL argument> [ { <comma> <SQL
> argument> }... ] ] <right paren>
>
> <SQL argument> ::= <value expression>
> | <generalized expression>
> | <target specification>
>
> <generalized expression> ::= <value expression> AS <path-resolved
> user-defined type name>
>
> In systems that have inheritance of composite types, this is used to
> specify which type the value is supposed to be interpreted as (for
> example, to treat the value as a supertype).
>
> Seems kind of bad to overload this with something completely different.
> What should we do?
>
>
I think we should fix it now. Quick thought: maybe we could use FOR
instead of AS: select myfunc(7 for a, 6 for b); IIRC the standard's
mechanism for this is 'paramname => value', but I think that has
problems because of our possibly use of => as an operator - otherwise
that would be by far the best way to go.
cheers
andrew
From | Date | Subject | |
---|---|---|---|
Next Message | Heikki Linnakangas | 2010-05-26 22:58:06 | Re: [spf:guess] Re: ROLLBACK TO SAVEPOINT |
Previous Message | Simon Riggs | 2010-05-26 22:52:04 | Re: Keepalive for max_standby_delay |