Re: functional call named notation clashes with SQL feature

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: functional call named notation clashes with SQL feature
Date: 2010-05-27 16:59:49
Message-ID: 3882.1274979589@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andrew Dunstan <andrew(at)dunslane(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2010-05-27 17:15:25 Re: command tag logging
Previous Message alvherre 2010-05-27 16:59:17 Re: command tag logging