Re: unintuitive subquery record wrapping - Mailing list pgsql-general

From Rikard Pavelic
Subject Re: unintuitive subquery record wrapping
Date
Msg-id 4C946AD1.90408@zg.htnet.hr
Whole thread Raw
In response to Re: unintuitive subquery record wrapping  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: unintuitive subquery record wrapping
Re: unintuitive subquery record wrapping
List pgsql-general
On 18.9.2010 4:31, Tom Lane wrote:
> Rikard Pavelic <rikard.pavelic@zg.htnet.hr> writes:
>
>> For basic query:
>> select t from t
>> result is of type t.
>>
> yeah ...
>
>
>> If I query:
>> select sq from (select t from t) sq;
>> result is of type record.
>>
> yeah ... it's a record containing a single field of type t.
>
>             regards, tom lane
>
>
That was unhelpful ;(

You removed the important part of question ;)
I'll try again...

I'm arguing that is seems wrong that I need to match alias name like this
select t from (select t from t) t
or like this
select sq from (select sq from t sq) sq
to get unwrapped type.

Maybe I'm alone arguing this because nobody writes queries like that :)

Regards,
Rikard


pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: unintuitive subquery record wrapping
Next
From: Arjen Nienhuis
Date:
Subject: Re: unintuitive subquery record wrapping