On Mon, May 25, 2020 at 09:21:26PM -0400, Bruce Momjian wrote:
> I think your best bet is to try getting someone to write a hook
> that will do the replacement so that you don't need to modify too much
> of the Postgres core code. You will need to have the hook updated for
> new versions of Postgres, which adds to the complexity.
Couldn't one just use the existing planner hook for that? The
post-parse analysis hook is run before a query rewrite, but the
planner hook could manipulate a rewrite before planning the query.
--
Michael