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

Поиск
Список
Период
Сортировка
Искать
От
Petr Jelinek
Тема
Re: Custom/Foreign-Join-APIs (Re: [v9.5] Custom Plan API)
Дата
Msg-id
54B07600.3050705@2ndquadrant.com
Ответ на
Список
Дерево обсуждения
Re: Custom/Foreign-Join-APIs (Re: [v9.5] Custom Plan API) Kouhei Kaigai <kaigai@ak.jp.nec.com>
On 10/01/15 01:19, Kohei KaiGai wrote:
> 2015-01-10 8:18 GMT+09:00 Jim Nasby :
>> 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;
>

Yeah there are actually several places in the code where "relid" means 
index in range table and not oid of relation, it still manages to 
confuse me. Nothing this patch can do about that.


--  Petr Jelinek                  http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services


В списке pgsql-hackers по дате отправления
От: Bruce Momjian
Дата:
От: Jim Nasby
Дата:
Сообщение: max_connections documentation
FAQ