Re: WIP: default values for function parameters

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: WIP: default values for function parameters
Дата
Msg-id 162867790812100937t19039addwaf62c7b7d86ef98c@mail.gmail.com
обсуждение исходный текст
Ответ на Re: WIP: default values for function parameters  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: WIP: default values for function parameters  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
2008/12/10 Tom Lane <tgl@sss.pgh.pa.us>:
> "Pavel Stehule" <pavel.stehule@gmail.com> writes:
>> look again
>> select c as foo from tab ...
>> select fce(c as foo) from tab ...
>
>> when you use AS as param names specification, you change meaning of
>> some construct via used context?
>
> Uh, what's your point?  AS changes the meaning too.  For example in
>
> select foo, bar from (select c as foo, d as bar from ...) ss;
>
> we are using AS to specify the names seen by the outer select.
> This seems to me to be quite a close parallel to attaching names
> to function parameters.

no, no - you use AS for an change of some property of set c column
values - label. Isn't important if this is select, subselect. label is
metadata - it's related to data. This is using of AS. Maybe it's
different for me, because I am not native speaker, so I feeling SQL
more like artifical language than you. For you using AS is more less
formal - it's your natural language. So I am filling some border
between data names (labels) and parameter names.

next argument - if we accept AS for param names, then we introduce
nonconsistent behave with SQL/XML functions.

select xmlforest(c1, c2 as foo, c3) -- there foo isn't doesn't mean
"use it as param foo", so from this view is using AS very dificult
accaptable too.

regards
Pavel Stehule

>
>                        regards, tom lane
>


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: cvs head initdb hangs on unixware
Следующее
От: Tom Lane
Дата:
Сообщение: Re: WIP: default values for function parameters