2008/12/10 Tom Lane <[EMAIL PROTECTED]>:
> "Pavel Stehule" <[EMAIL PROTECTED]> 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
>

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to