pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrey Lepikhov <a.lepikhov@postgrespro.ru>
To: Tom Lane <tgl@sss.pgh.pa.us>
To: Alexander Pyhalov <a.pyhalov@postgrespro.ru>
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, 2 Jun 2021 12:39:37 +0500
Message-ID: <f0e58ebd-e5e6-e905-f3ab-a609272e6f08@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>

On 2/6/21 02:32, Tom Lane wrote:
> 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
> 
I played with your patch and couldn't find any errors. But what if ROW 
operation were allowed to be pushed to a foreign server?
Potentially, I can imagine pushed-down JOIN with arbitrary ROW function 
in its target list.
Amit's approach looks more safe for me.

-- 
regards,
Andrey Lepikhov
Postgres Professional





view thread (13+ messages)  latest in thread

Message-ID: <f0e58ebd-e5e6-e905-f3ab-a609272e6f08@postgrespro.ru>
Permalink:  ../f0e58ebd-e5e6-e905-f3ab-a609272e6f08@postgrespro.ru/
Also on:    postgresql.org/message-id/f0e58ebd-e5e6-e905-f3ab-a609272e6f08@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.lepikhov@postgrespro.ru, tgl@sss.pgh.pa.us, a.pyhalov@postgrespro.ru, amitlangote09@gmail.com
  Subject: Re: join pushdown and issue with foreign update
  In-Reply-To: <f0e58ebd-e5e6-e905-f3ab-a609272e6f08@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> <f0e58ebd-e5e6-e905-f3ab-a609272e6f08@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