Re: [HACKERS] Possible problem in Custom Scan API - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] Possible problem in Custom Scan API
Date
Msg-id 4509.1491944329@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] Possible problem in Custom Scan API  (Dmitry Ivanov <d.ivanov@postgrespro.ru>)
Responses Re: [HACKERS] Possible problem in Custom Scan API  (Dmitry Ivanov <d.ivanov@postgrespro.ru>)
List pgsql-hackers
Dmitry Ivanov <d.ivanov@postgrespro.ru> writes:
>> Reading between the lines, I think the problem may be that you're not
>> being careful about how you set up custom_scan_tlist.  But since the
>> core code has zero involvement in that decision, it's hard to see why
>> it would be a core code bug.

> I'm sorry, but you didn't understand. It's *the core code* that builds the 
> targetlist, and sometimes it may decide to provide a physical targetlist, 
> not the one that's *really needed*.

Uh, no, construction of a custom plan node is entirely driven by the
PlanCustomPath method as far as I can see.  You're free to ignore what
create_scan_plan did and insert your own tlist.  In particular, if what
your custom path actually is is a rescan of something like an
IndexOnlyScan, why don't you just copy the IOS's result tlist?
        regards, tom lane



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] src/interfaces/libpq shipping nmake-related Makefiles
Next
From: Andrew Dunstan
Date:
Subject: Re: [HACKERS] TAP tests take a long time