pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alexander Pyhalov <a.pyhalov@postgrespro.ru>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Amit Langote <amitlangote09@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: join pushdown and issue with foreign update
Date: Wed, 02 Jun 2021 11:35:09 +0300
Message-ID: <acf79e524b9a25617ba00410393b8351@postgrespro.ru> (raw)
In-Reply-To: <2854976.1622583171@sss.pgh.pa.us>
References: <7817fb9ebd6661cdf9b67dec6e129a78@postgrespro.ru>
	<ae6d414df6165d50ec9db4265f999c14@postgrespro.ru>
	<CA+HiwqHnLESTUQUQ3-MBxOatPK4P4uu2Br3+6KRxFfbBO=HgFw@mail.gmail.com>
	<050b90460c024dd21af53dbaaf8fd510@postgrespro.ru>
	<2845636.1622571541@sss.pgh.pa.us>
	<2854976.1622583171@sss.pgh.pa.us>

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





view thread (13+ messages)  latest in thread

Message-ID: <acf79e524b9a25617ba00410393b8351@postgrespro.ru>
Permalink:  ../acf79e524b9a25617ba00410393b8351@postgrespro.ru/
Also on:    postgresql.org/message-id/acf79e524b9a25617ba00410393b8351@postgrespro.ru

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: a.pyhalov@postgrespro.ru, tgl@sss.pgh.pa.us, amitlangote09@gmail.com
  Subject: Re: join pushdown and issue with foreign update
  In-Reply-To: <acf79e524b9a25617ba00410393b8351@postgrespro.ru>
  References: <7817fb9ebd6661cdf9b67dec6e129a78@postgrespro.ru> <ae6d414df6165d50ec9db4265f999c14@postgrespro.ru> <CA+HiwqHnLESTUQUQ3-MBxOatPK4P4uu2Br3+6KRxFfbBO=HgFw@mail.gmail.com> <050b90460c024dd21af53dbaaf8fd510@postgrespro.ru> <2845636.1622571541@sss.pgh.pa.us> <2854976.1622583171@sss.pgh.pa.us> <acf79e524b9a25617ba00410393b8351@postgrespro.ru>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox