-
Notifications
You must be signed in to change notification settings - Fork 2
Description
From the Postgres Hackers Discord:
@theory: In an FDW, is there a way to push down a union query when each select within it is from a foreign table?
@Robert Haas: i'm not sure if it's possible, but if it is possible, i would guess that it involvesGetForeignUpperPaths
@theory: I need a tutorial for this stuff…
@tgl: In principle we could support that I think, but I bet there's missing infrastructure that would make it hard. In the case of joins there's some in-core code that recognizes when all the joined tables belong to the same FDW, but I don't thinkprepunion.chas any equivalent. If you're excited about this I suggest working on a patch for that, rather than trying to figure out how to do it without any core support.
@theory: Thanks, super useful information. Will keep it in my mental backlog for sure as I work through learning the FDW stuff, see where there are gaps, and figure out which to try to plug first.