Re: functional call named notation clashes with SQL feature - Mailing list pgsql-hackers

From Tom Lane
Subject Re: functional call named notation clashes with SQL feature
Date
Msg-id 3882.1274979589@sss.pgh.pa.us
Whole thread Raw
In response to Re: functional call named notation clashes with SQL feature  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: functional call named notation clashes with SQL feature
Re: functional call named notation clashes with SQL feature
List pgsql-hackers
Andrew Dunstan <andrew@dunslane.net> writes:
> Peter Eisentraut wrote:
>> 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).

Why don't they just use CAST() syntax for that, instead of adding this
unnecessary syntax wart?

If their complaint is that CAST() is too much typing, perhaps they
could adopt :: cast notation ;-)

> 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);

I'm afraid FOR doesn't work either; it'll create a conflict with the
spec-defined SUBSTRING(x FOR y) syntax.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Jan Wieck
Date:
Subject: Re: Exposing the Xact commit order to the user
Next
From: Tom Lane
Date:
Subject: Re: [ADMIN] command tag logging