Re: is syntax columname(tablename) necessary still?

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Greg Stark <gsstark(at)mit(dot)edu>, David Fetter <david(at)fetter(dot)org>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: is syntax columname(tablename) necessary still?
Date: 2010-08-09 15:24:47
Message-ID: AANLkTimcCQtY3S=1URaXbn3p7-BHbGsXMv4rZi3FGWMq@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2010/8/9 Robert Haas <robertmhaas(at)gmail(dot)com>:
> On Mon, Aug 9, 2010 at 11:06 AM, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> wrote:
>> 2010/8/9 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:
>>> Greg Stark <gsstark(at)mit(dot)edu> writes:
>>>> Personally I think cube is uncommonly used and CUBE an important
>>>> enough SQL feature that we should just bite the bullet and kill/rename
>>>> the contrib module.
>>>
>>> Yeah.  It looks to me like CUBE will have to be a type_function_name
>>> keyword (but hopefully not fully reserved), which will mean that we
>>> can't have a contrib module defining a type by that name.  Ergo, rename.
>>
>> I am afraid, CUBE and ROLLUP have to be a reserved keyword because as
>> type_function_name is in conflict with func_name ( ...
>
> They name to be type_func_keywords, perhaps, but not fully reserved.
> And they'd still need that treatment anyway.  Even if cube(whatever)
> can't mean "extract a column called cube from table whatever", it can
> still mean "call a function called cube on a column called whatever".

look to gram.y, please.

we can use a

GROUP BY CUBE(expr, ..)
GROUP BY func_name(expr, ..)

so these rules are in conflict, because func_name can have a
type_func_keywords symbols. So we have to significantly rewrite a
rules about func call or CUBE and ROLLUP have to be a reserved words.
There isn't any other possibility.

regards

Pavel

>
> --
> Robert Haas
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise Postgres Company
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tatsuo Ishii 2010-08-09 15:25:21 Re: regclass, \d command and temp tables
Previous Message Tom Lane 2010-08-09 15:16:47 Re: regclass, \d command and temp tables