Re: Rewriter hook - Mailing list pgsql-hackers

From Peter Geoghegan
Subject Re: Rewriter hook
Date
Msg-id CAEYLb_XtWW=Tn0yRef+5AkVF4UA2go617UUUVQX8C3kSTDuRRQ@mail.gmail.com
Whole thread Raw
In response to Rewriter hook  (Vlad Arkhipov <arhipov@dc.baikal.ru>)
List pgsql-hackers
On 29 December 2012 01:36, Vlad Arkhipov <arhipov@dc.baikal.ru> wrote:
> Are there any plans on adding a rewriter hook?

I doubt it will ever happen.

If you look at QueryRewrite(Query *parsetree), the primary entry point
to the rewriter, it's easy enough to get a high level overview of what
goes on.

You can get the post-parse-analyze tree by registering a
post_parse_analyze_hook (like pg_stat_statements), and the same tree
*after* rule expansion by registering a planner_hook. It isn't obvious
what you're missing that a hook into the rewriter would get you.

-- 
Peter Geoghegan       http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training and Services



pgsql-hackers by date:

Previous
From: Vlad Arkhipov
Date:
Subject: Rewriter hook
Next
From: Jaime Casanova
Date:
Subject: Re: Rewriter hook