From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | André Fernandes <andre(dot)de(dot)camargo(dot)fernandes(at)hotmail(dot)com> |
Cc: | robertmhaas(at)gmail(dot)com, heikki(dot)linnakangas(at)enterprisedb(dot)com, arhipov(at)dc(dot)baikal(dot)ru, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Name column |
Date: | 2010-09-24 16:00:46 |
Message-ID: | AANLkTimBkbrHo+GwG551T-Z_VUtE2OYqNyE3+mvxDGxd@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
2010/9/24 André Fernandes <andre(dot)de(dot)camargo(dot)fernandes(at)hotmail(dot)com>:
>
>
>> Date: Fri, 24 Sep 2010 08:01:35 -0400
>> Subject: Re: [HACKERS] Name column
>> From: robertmhaas(at)gmail(dot)com
>> To: heikki(dot)linnakangas(at)enterprisedb(dot)com
>> CC: arhipov(at)dc(dot)baikal(dot)ru; pgsql-hackers(at)postgresql(dot)org
>>
>> On Fri, Sep 24, 2010 at 6:35 AM, Heikki Linnakangas
>> <heikki(dot)linnakangas(at)enterprisedb(dot)com> wrote:
>> > For historical reasons PostgreSQL supports calling a function with a
>> > single
>> > argument like "column.function", in addition to "function(column)".
>> > There is
>> > a function "name(text)" that casts the input to the 'name' datatype, so
>> > your
>> > example casts the row to text and from text to name.
>>
>> I'm starting to wonder if we should think about deprecating this
>> behavior. It is awfully confusing and unintuitive.
>>
>
> I agree, it is very unintuitive.
> +1 for deprecating this behavior.
+1
I dislike this feature too. It is breaking other ANSI SQL feature -
constructors, because it has same syntax tablename(field1, field2,
....). Sure, usually we can do
ROW(a,b,c)::type - but little bit nicer and with standard is type(a,b,c).
Regards
Pavel Stehule
>
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2010-09-24 16:03:14 | Re: Name column |
Previous Message | Thom Brown | 2010-09-24 15:59:44 | Re: Enable logging requires restart |