Обсуждение: some possible parser cleaning: drop support column(table) syntax

Поиск
Список
Период
Сортировка

some possible parser cleaning: drop support column(table) syntax

От
Pavel Stehule
Дата:
Hello

this is syntax column(table) necessary still?

postgres=# select a(x) from x;a
────10
(1 row)

Regards
Pavel Stehule


Re: some possible parser cleaning: drop support column(table) syntax

От
Tom Lane
Дата:
Pavel Stehule <pavel.stehule@gmail.com> writes:
> this is syntax column(table) necessary still?

There is no reason to remove that.
        regards, tom lane


Re: some possible parser cleaning: drop support column(table) syntax

От
Pavel Stehule
Дата:
2009/10/22 Tom Lane <tgl@sss.pgh.pa.us>:
> Pavel Stehule <pavel.stehule@gmail.com> writes:
>> this is syntax column(table) necessary still?
>
> There is no reason to remove that.
>

do you know somebody who use it? It is dead code. Processing of call
functions should be simpler.

Pavel

>                        regards, tom lane
>


Re: some possible parser cleaning: drop support column(table) syntax

От
Tom Lane
Дата:
Pavel Stehule <pavel.stehule@gmail.com> writes:
> 2009/10/22 Tom Lane <tgl@sss.pgh.pa.us>:
>> Pavel Stehule <pavel.stehule@gmail.com> writes:
>>> this is syntax column(table) necessary still?

>> There is no reason to remove that.

> do you know somebody who use it? It is dead code.

It is not --- it's the recommended solution for emulating computed
columns.  The column-as-f(x) direction maybe isn't terribly exciting,
but the function-as-x.col direction definitely is.
        regards, tom lane


Re: some possible parser cleaning: drop support column(table) syntax

От
Robert Haas
Дата:
On Thu, Oct 22, 2009 at 10:22 AM, Pavel Stehule <pavel.stehule@gmail.com> wrote:
> 2009/10/22 Tom Lane <tgl@sss.pgh.pa.us>:
>> Pavel Stehule <pavel.stehule@gmail.com> writes:
>>> this is syntax column(table) necessary still?
>>
>> There is no reason to remove that.
>>
>
> do you know somebody who use it? It is dead code. Processing of call
> functions should be simpler.

"Dead code" means code that can't actually be reached, not code that
does something you don't like.  :-)

...Robert


Re: some possible parser cleaning: drop support column(table) syntax

От
Pavel Stehule
Дата:
2009/10/22 Tom Lane <tgl@sss.pgh.pa.us>:
> Pavel Stehule <pavel.stehule@gmail.com> writes:
>> 2009/10/22 Tom Lane <tgl@sss.pgh.pa.us>:
>>> Pavel Stehule <pavel.stehule@gmail.com> writes:
>>>> this is syntax column(table) necessary still?
>
>>> There is no reason to remove that.
>
>> do you know somebody who use it? It is dead code.
>
> It is not --- it's the recommended solution for emulating computed
> columns.  The column-as-f(x) direction maybe isn't terribly exciting,
> but the function-as-x.col direction definitely is.
>

is it documented?

regards
Pavel Stehule

>                        regards, tom lane
>


Re: some possible parser cleaning: drop support column(table) syntax

От
Tom Lane
Дата:
Pavel Stehule <pavel.stehule@gmail.com> writes:
> 2009/10/22 Tom Lane <tgl@sss.pgh.pa.us>:
>> It is not --- it's the recommended solution for emulating computed
>> columns.  The column-as-f(x) direction maybe isn't terribly exciting,
>> but the function-as-x.col direction definitely is.

> is it documented?

Yes, see "SQL Functions on Composite Types" (34.4.2 as of CVS HEAD),
down near the end of that subsection.
        regards, tom lane


Re: some possible parser cleaning: drop support column(table) syntax

От
Pavel Stehule
Дата:
2009/10/22 Tom Lane <tgl@sss.pgh.pa.us>:
> Pavel Stehule <pavel.stehule@gmail.com> writes:
>> 2009/10/22 Tom Lane <tgl@sss.pgh.pa.us>:
>>> It is not --- it's the recommended solution for emulating computed
>>> columns.  The column-as-f(x) direction maybe isn't terribly exciting,
>>> but the function-as-x.col direction definitely is.
>
>> is it documented?
>
> Yes, see "SQL Functions on Composite Types" (34.4.2 as of CVS HEAD),
> down near the end of that subsection.
>

ok, thank you
Pavel

>                        regards, tom lane
>