Inspecting generated PlannerInfo - Mailing list pgsql-novice

From Fábio Moreira
Subject Inspecting generated PlannerInfo
Date
Msg-id CANQddpPTpV6Z370jtzeK0stcHvVnzrzbxAjo+CSkGNh4VwFWDA@mail.gmail.com
Whole thread Raw
Responses Re: Inspecting generated PlannerInfo
List 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

pgsql-novice by date:

Previous
From: Simon Riggs
Date:
Subject: Re: [HACKERS] WHERE clause not used when index is used
Next
From: Tom Lane
Date:
Subject: Re: Inspecting generated PlannerInfo