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

From: Kohei KaiGai <kaigai(at)kaigai(dot)gr(dot)jp>
To: Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com>
Cc: Kouhei Kaigai <kaigai(at)ak(dot)jp(dot)nec(dot)com>, Petr Jelinek <petr(at)2ndquadrant(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "pgsql-hackers(at)postgreSQL(dot)org" <pgsql-hackers(at)postgresql(dot)org>, Shigeru Hanada <shigeru(dot)hanada(at)gmail(dot)com>
Subject: Re: Custom/Foreign-Join-APIs (Re: [v9.5] Custom Plan API)
Date: 2015-01-10 00:19:51
Message-ID: CADyhKSU7-jXb_-4jw_=+yUy3xTJhvC6v7D0vMK9gDNFX3fHBJw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2015-01-10 8:18 GMT+09:00 Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com>:
> On 1/6/15, 5:43 PM, Kouhei Kaigai wrote:
>>>>
>>>> scan_relid != InvalidOid
>>>> > >
>>>
>>> >
>>> >Ideally, they should be OidIsValid(scan_relid)
>>> >
>>
>> Scan.scanrelid is an index of range-tables list, not an object-id.
>> So, InvalidOid or OidIsValid() are not a good choice.
>
>
> I think the name needs to change then; scan_relid certainly looks like the
> OID of a relation.
>
> scan_index?
>
Yep, I had a same impression when I looked at the code first time,
however, it is defined as below. Not a manner of custom-scan itself.

/*
* ==========
* Scan nodes
* ==========
*/
typedef struct Scan
{
Plan plan;
Index scanrelid; /* relid is index into the range table */
} Scan;

--
KaiGai Kohei <kaigai(at)kaigai(dot)gr(dot)jp>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dean Rasheed 2015-01-10 00:28:15 Re: Possible typo in create_policy.sgml
Previous Message Jim Nasby 2015-01-10 00:14:25 Re: Parallel Seq Scan