Re: Optimizing nested ConvertRowtypeExpr execution - Mailing list pgsql-hackers

From Ashutosh Bapat
Subject Re: Optimizing nested ConvertRowtypeExpr execution
Date
Msg-id CAFjFpReDrtM8YVmTBgHHK3p8P9wEpKPO=YurkbqukM5c1oa0cQ@mail.gmail.com
Whole thread Raw
In response to Re: Optimizing nested ConvertRowtypeExpr execution  (Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>)
Responses Re: Optimizing nested ConvertRowtypeExpr execution
Re: Optimizing nested ConvertRowtypeExpr execution
List pgsql-hackers
On Mon, Apr 9, 2018 at 3:49 PM, Kyotaro HORIGUCHI
<horiguchi.kyotaro@lab.ntt.co.jp> wrote:
>
> I don't think it is not only on constatns.  With the patch,
> non-constants are .. getting a rather strange conversion.
>
>
>> =# explain verbose select (a, b, c)::t1p1p1::t1p1::t1 from (select i, i * 2, i * 3 from generate_series(0, 10) i)
x(a,b, c);
 
>>                              QUERY PLAN
>> -------------------------------------------------------------------------
> ...
>>    Output: (ROW(i.i, (i.i * 2), (i.i * 3))::t1p1p1)::t1
>
> Conversions between scalar values cannot be assumed safely
> composed each other for general inputs but it is known to be safe
> for the ConvertRowtypeExpr case.. I think.

I am not able to parse this statement.

What output do you see without the patch?

-- 
Best Wishes,
Ashutosh Bapat
EnterpriseDB Corporation
The Postgres Database Company


pgsql-hackers by date:

Previous
From: Etsuro Fujita
Date:
Subject: Re: [HACKERS] Add support for tuple routing to foreign partitions
Next
From: Kyotaro HORIGUCHI
Date:
Subject: Fixing a trivial typo in comment in rewriteManip.c