Re: Convert query plan to sql query - Mailing list pgsql-hackers

From Ashutosh Bapat
Subject Re: Convert query plan to sql query
Date
Msg-id CAFjFpRczRiBoLsqqXUvsV2t0pDFCK5zhwRVhgA9t+RCT5DA+xw@mail.gmail.com
Whole thread Raw
In response to Convert query plan to sql query  (mariem <mariem.benfadhel@gmail.com>)
Responses Re: Convert query plan to sql query  (mariem <mariem.benfadhel@gmail.com>)
List pgsql-hackers
<div dir="ltr">May be you want to check how it's done in Postgres-XC. Postgres-XC works on plans being created by
PostgreSQLand "reverse-engineers" queries (for parts of the plans which are "shippable".) The notions of "shippability"
maynot be of interest to you, but the code to "reverse-engineer" most of the plan nodes is there in Postgres-XC.<br
/></div><divclass="gmail_extra"><br /><div class="gmail_quote">On Wed, Nov 5, 2014 at 8:47 AM, mariem <span
dir="ltr"><<ahref="mailto:mariem.benfadhel@gmail.com" target="_blank">mariem.benfadhel@gmail.com</a>></span>
wrote:<br/><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc
solid;padding-left:1ex">Hello,<br/><br /> I would like to transform the query plan (output of the planner,<br />
debug_print_plan)into an sql query.<br /> I know that there are pieces of the query plan that might be machine<br />
dependent(in var for example).<br /> So I wanted to have your suggestions or thoughts before I put efforts into<br />
it.<br/><br /> Basically, if I have:<br />  query1 -> parser -> rewriter -> planner<br /> the process would be
:<br/>  query_plan -> planner -> parser -> query2<br /><br /> query1 and query2 are not necessarily the same
dueto rewrite, stats..<br /><br /> Thanks!<br /><br /><br /><br /><br /> --<br /> View this message in context: <a
href="http://postgresql.1045698.n5.nabble.com/Convert-query-plan-to-sql-query-tp5825727.html"
target="_blank">http://postgresql.1045698.n5.nabble.com/Convert-query-plan-to-sql-query-tp5825727.html</a><br/> Sent
fromthe PostgreSQL - hackers mailing list archive at Nabble.com.<br /><span class="HOEnZb"><font color="#888888"><br
/><br/> --<br /> Sent via pgsql-hackers mailing list (<a
href="mailto:pgsql-hackers@postgresql.org">pgsql-hackers@postgresql.org</a>)<br/> To make changes to your
subscription:<br/><a href="http://www.postgresql.org/mailpref/pgsql-hackers"
target="_blank">http://www.postgresql.org/mailpref/pgsql-hackers</a><br/></font></span></blockquote></div><br /><br
clear="all"/><br />-- <br /><div dir="ltr">Best Wishes,<br />Ashutosh Bapat<br />EnterpriseDB Corporation<br />The
PostgresDatabase Company<br /></div></div> 

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: WAL replay bugs
Next
From: David Fetter
Date:
Subject: Re: Let's drop two obsolete features which are bear-traps for novices