> > 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 <[email protected]> > -----Original Message----- > From: Petr Jelinek [mailto:[email protected]] > Sent: Wednesday, January 07, 2015 8:24 AM > To: Jim Nasby; Kaigai Kouhei(海外 浩平); Robert Haas > Cc: Tom Lane; [email protected]; 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 -- Sent via pgsql-hackers mailing list ([email protected]) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
