Inspecting generated PlannerInfo

From: Fábio Moreira <fabio(at)dias(dot)moreira(dot)nom(dot)br>
To: pgsql-novice(at)postgresql(dot)org
Subject: Inspecting generated PlannerInfo
Date: 2016-03-03 05:10:45
Message-ID: CANQddpPTpV6Z370jtzeK0stcHvVnzrzbxAjo+CSkGNh4VwFWDA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hi everyone,

I wanted to dig around the query planner (specifically, to convert
sub-SELECTs in WHERE to LEFT OUTER JOINs — I’m looking into modifying
pull_up_sublinks() for that).

From what I could find, PostgreSQL’s tests check for output correctness but
not if the query planner is actually applying specific optimizations to the
input query; is that correct? Is there any way of serializing a PlannerInfo
struct to inspect whether my function is applying the transformations I
expect it to?

(I understand, of course, that any optimizations should eventually be
visible through EXPLAIN SELECT, but that’s less than ideal for development,
as the PlannerInfo will probably also get altered by other optimizations in
the way to the client.)

Thanks,

--
Fábio Dias Moreira

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Simon Riggs 2016-03-03 10:07:34 Re: [NOVICE] WHERE clause not used when index is used
Previous Message Simon Riggs 2016-03-02 10:57:52 Re: [NOVICE] WHERE clause not used when index is used