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

Поиск
Список
Период
Сортировка
От Kouhei Kaigai
Тема Re: Custom/Foreign-Join-APIs (Re: [v9.5] Custom Plan API)
Дата
Msg-id 9A28C8860F777E439AA12E8AEA7694F80109CBAE@BPXM15GP.gisp.nec.co.jp
обсуждение исходный текст
Ответ на Re: Custom/Foreign-Join-APIs (Re: [v9.5] Custom Plan API)  (Petr Jelinek <petr@2ndquadrant.com>)
Ответы Re: Custom/Foreign-Join-APIs (Re: [v9.5] Custom Plan API)  (Jim Nasby <Jim.Nasby@BlueTreble.com>)
Список pgsql-hackers
> > 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.

The bare relation oid has to be saved on relid of RangeTblEntry
which can be pulled using rt_fetch(scanrelid, range_tables).

I could found an assertion below at ExecScanFetch(). Assert(scanrelid > 0);
Probably, it is a usual manner for this.

Thanks,
--
NEC OSS Promotion Center / PG-Strom Project
KaiGai Kohei <kaigai@ak.jp.nec.com>


> -----Original Message-----
> From: Petr Jelinek [mailto:petr@2ndquadrant.com]
> Sent: Wednesday, January 07, 2015 8:24 AM
> To: Jim Nasby; Kaigai Kouhei(海外 浩平); Robert Haas
> Cc: Tom Lane; pgsql-hackers@postgreSQL.org; Shigeru Hanada
> Subject: Re: Custom/Foreign-Join-APIs (Re: [HACKERS] [v9.5] Custom Plan
> API)
> 
> On 07/01/15 00:05, Jim Nasby wrote:
> > On 1/6/15, 8:17 AM, Kouhei Kaigai wrote:
> >> The attached patch is newer revision of custom-/foreign-join
> >> interface.
> >
> > Shouldn't instances of
> >
> > scan_relid > 0
> >
> > be
> >
> > scan_relid != InvalidOid
> >
> 
> Ideally, they should be OidIsValid(scan_relid)
> 
> 
> --
>   Petr Jelinek                  http://www.2ndQuadrant.com/
>   PostgreSQL Development, 24x7 Support, Training & Services

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Jim Nasby
Дата:
Сообщение: Re: Patch to add functionality to specify ORDER BY in CREATE FUNCTION for SRFs
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: pg_rewind in contrib