Re: Postgres_fdw join pushdown - wrong results with whole-row reference

From: Etsuro Fujita <fujita(dot)etsuro(at)lab(dot)ntt(dot)co(dot)jp>
To: Ashutosh Bapat <ashutosh(dot)bapat(at)enterprisedb(dot)com>
Cc: Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>, Rushabh Lathia <rushabh(dot)lathia(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Postgres_fdw join pushdown - wrong results with whole-row reference
Date: 2016-06-21 12:44:49
Message-ID: 9c104785-0118-f467-f068-296d5f8b28e3@lab.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2016/06/21 21:37, Ashutosh Bapat wrote:

> How about using a system column eg, ctid, for the CASE WHEN
> conversion; in Rushabh's example the reference to "r1" would be
> converted with "CASE WHEN r1.ctid IS NOT NULL THEN ROW(r1.empno,
> r1.ename, r1.job, r1.mgr, r1.hiredate, r1.sal, r1.comm, r1.deptno)
> END". IMO I think that that would be much simpler than Ashutosh's
> approach.

> A foreign table can have a view, a regular table, another foreign table
> or a materialised view a its target. A view does not support any of the
> system columns, so none of them are available.

You are right. Sorry for the noise.

Best regards,
Etsuro Fujita

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Craig Ringer 2016-06-21 12:56:09 Re: Lets (not) break all the things. Was: [pgsql-advocacy] 9.6 -> 10.0
Previous Message Ashutosh Bapat 2016-06-21 12:37:34 Re: Postgres_fdw join pushdown - wrong results with whole-row reference