From: | Amin <amin(dot)fallahi(at)gmail(dot)com> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Get access to the whole query in CustomScan path callback |
Date: | 2022-12-21 02:34:32 |
Message-ID: | CAF-KA8_=Du=DttZNT1TsX4eZfLtBsV+ntzBCVio+B6XPoAOGkg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
The goal is to have access to all the tables that are being scanned or will
be scanned as a part of the query. Basically, the callback looks like this:
typedef void (*set_rel_pathlist_hook_type) (PlannerInfo *root,
RelOptInfo *rel,
Index rti,
RangeTblEntry *rte);
Now, the problem is when there is a nested query, the function will be
called once for the parent query and once for the subquery. However, I need
access to the whole query in this function. There seems to be no CustomScan
callback before this that has the whole query passed to it. Is there any
way I can get access to the complete query (or all the relations in the
query) by using the parameters passed to this function? Or any other
workaround?
Thank you and happy holidays!
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Geoghegan | 2022-12-21 03:15:33 | Re: New strategies for freezing, advancing relfrozenxid early |
Previous Message | Justin Pryzby | 2022-12-21 02:29:32 | Re: Simplifications for error messages related to compression |