Re: join pushdown and issue with foreign update - Mailing list pgsql-hackers

From Alexander Pyhalov
Subject Re: join pushdown and issue with foreign update
Date
Msg-id acf79e524b9a25617ba00410393b8351@postgrespro.ru
Whole thread Raw
In response to Re: join pushdown and issue with foreign update  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane писал 2021-06-02 00:32:
> I wrote:
>> I think a preferable fix involves making sure that the correct
>> record-type typmod is propagated to record_in in this context.
>> Alternatively, maybe we could insert the foreign table's rowtype
>> during execution of the input operation, without touching the
>> plan as such.
> 
> Here's a draft-quality patch based on that idea.  It resolves
> the offered test case, but I haven't beat on it beyond that.
> 
>             regards, tom lane

Hi.
The patch seems to work fine for mentioned case.
For now I'm working on function pushdown. When record-returning function 
(like unnest())
is pushed down, on this stage we've already lost any type information, 
so get the issue again.
So far I'm not sure how to fix the issue, perhaps just avoid pushing 
foreign join if we have
record, corresponding to function RTE var in joinrel->reltarget?

-- 
Best regards,
Alexander Pyhalov,
Postgres Professional



pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Two patches to speed up pg_rewind.
Next
From: Daniel Gustafsson
Date:
Subject: Re: TAP tests still sensitive to various PG* environment variables