Re: Rewriter hook

From: Peter Geoghegan <peter(at)2ndquadrant(dot)com>
To: Vlad Arkhipov <arhipov(at)dc(dot)baikal(dot)ru>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Rewriter hook
Date: 2012-12-29 02:00:42
Message-ID: CAEYLb_XtWW=Tn0yRef+5AkVF4UA2go617UUUVQX8C3kSTDuRRQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 29 December 2012 01:36, Vlad Arkhipov <arhipov(at)dc(dot)baikal(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jaime Casanova 2012-12-29 02:05:42 Re: Rewriter hook
Previous Message Vlad Arkhipov 2012-12-29 01:36:55 Rewriter hook