Re: Custom/Foreign-Join-APIs (Re: [v9.5] Custom Plan API)

From: Shigeru HANADA <shigeru(dot)hanada(at)gmail(dot)com>
To: Kouhei Kaigai <kaigai(at)ak(dot)jp(dot)nec(dot)com>
Cc: Ashutosh Bapat <ashutosh(dot)bapat(at)enterprisedb(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Thom Brown <thom(at)linux(dot)com>, "pgsql-hackers(at)postgreSQL(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Custom/Foreign-Join-APIs (Re: [v9.5] Custom Plan API)
Date: 2015-04-14 10:49:28
Message-ID: C88767B3-A96E-415D-9273-975BF368461E@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

KaiGai-san,

2015/04/14 14:04、Kouhei Kaigai <kaigai(at)ak(dot)jp(dot)nec(dot)com> のメール:
>
>> * Fix typos
>>
>> Please review the v11 patch, and mark it as “ready for committer” if it’s ok.
>>
> It's OK for me, and wants to be reviewed by other people to get it committed.
>

Thanks!

>> In addition to essential features, I tried to implement relation listing in EXPLAIN
>> output.
>>
>> Attached explain_forein_join.patch adds capability to show join combination of
>> a ForeignScan in EXPLAIN output as an additional item “Relations”. I thought
>> that using array to list relations is a good way too, but I chose one string value
>> because users would like to know order and type of joins too.
>>
> A bit different from my expectation... I expected to display name of the local
> foreign tables (and its alias), not remote one, because all the local join logic
> displays local foreign tables name.
> Is it easy to adjust isn't it? Probably, all you need to do is, putting a local
> relation name on the text buffer (at deparseSelectSql) instead of the deparsed
> remote relation.

Oops, that’s right. Attached is the revised version. I chose fully qualified name, schema.relname [alias] for the output. It would waste some cycles during planning if that is not for EXPLAIN, but it seems difficult to get a list of name of relations in ExplainForeignScan() phase, because planning information has gone away at that time.

--
Shigeru HANADA
shigeru(dot)hanada(at)gmail(dot)com

Attachment Content-Type Size
explain_foreign_join_v2.patch application/octet-stream 17.8 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2015-04-14 11:40:33 Make more portable TAP tests of initdb
Previous Message Etsuro Fujita 2015-04-14 10:49:26 Re: inherit support for foreign tables