Re: T_CustomScan on ExplainTargetRel

From: Kouhei Kaigai <kaigai(at)ak(dot)jp(dot)nec(dot)com>
To: Kouhei Kaigai <kaigai(at)ak(dot)jp(dot)nec(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: T_CustomScan on ExplainTargetRel
Date: 2014-11-20 06:44:25
Message-ID: 9A28C8860F777E439AA12E8AEA7694F8010836E4@BPXM15GP.gisp.nec.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

BTW, I published the 'ctidscan' module below as an example of custom-scan.

https://github.com/kaigai/ctidscan

--
NEC OSS Promotion Center / PG-Strom Project
KaiGai Kohei <kaigai(at)ak(dot)jp(dot)nec(dot)com>

> -----Original Message-----
> From: pgsql-hackers-owner(at)postgresql(dot)org
> [mailto:pgsql-hackers-owner(at)postgresql(dot)org] On Behalf Of Kouhei Kaigai
> Sent: Thursday, November 20, 2014 3:42 PM
> To: pgsql-hackers(at)postgresql(dot)org
> Subject: [HACKERS] T_CustomScan on ExplainTargetRel
>
> Hello,
>
> The attached obvious patch adds T_CustomScan on case-switch of
> ExplainTargetRel() that was oversight.
>
> It looked like working, but what it did was just printing referenced name,
> instead of table name.
>
> postgres=# explain select ctid, * from t0 hoge where ctid > '(50,0)'::tid;
> QUERY PLAN
> ----------------------------------------------------------------------
> --
> Custom Scan (ctidscan) on hoge (cost=0.00..100.00 rows=3333 width=43)
> Filter: (ctid > '(50,0)'::tid)
> ctid quals: (ctid > '(50,0)'::tid)
> (3 rows)
>
> This patch fixes up this behavior, as like other *Scan nodes are doing.
>
> postgres=# explain select ctid, * from t0 hoge where ctid > '(50,0)'::tid;
> QUERY PLAN
> -------------------------------------------------------------
> Seq Scan on t0 hoge (cost=0.00..209.00 rows=3333 width=43)
> Filter: (ctid > '(50,0)'::tid)
> (2 rows)
>
> Thanks,
> --
> NEC OSS Promotion Center / PG-Strom Project KaiGai Kohei
> <kaigai(at)ak(dot)jp(dot)nec(dot)com>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2014-11-20 07:27:33 Re: pg_basebackup vs. Windows and tablespaces
Previous Message Kouhei Kaigai 2014-11-20 06:41:48 T_CustomScan on ExplainTargetRel