Re: Convert query plan to sql query

From: mariem <mariem(dot)benfadhel(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Convert query plan to sql query
Date: 2014-11-08 06:09:58
Message-ID: 1415426998128-5826175.post@n5.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Tom,
>If you don't need that, why are you insistent on extracting the
>information from a plan tree?

I need to resolve expressions and apply rewrite rules before I reverse the
query plan to a query.

>It seems far simpler to me to make use of ruleutils.c to reverse-list
>the original parsetree. That functionality already exists and is well
>tested and well maintained. If you insist on working from a plan tree,
>you will be writing a fair amount of code that you will have to maintain
>yourself. And I absolutely, positively guarantee that we will break it
>in every major release, and occasionally in minor releases. You should
>read the git history of explain.c and ruleutils.c and ask yourself whether
>you want to keep up with that level of churn.

I'm aware of ruleutils.c which I think is a good tool but I don't think it's
appropriate as it takes the parse tree as input.

Best,
Mariem

--
View this message in context: http://postgresql.1045698.n5.nabble.com/Convert-query-plan-to-sql-query-tp5825727p5826175.html
Sent from the PostgreSQL - hackers mailing list archive at Nabble.com.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Rowley 2014-11-08 06:41:34 Re: BRIN indexes - TRAP: BadArgument
Previous Message Michael Paquier 2014-11-08 05:37:03 Re: split builtins.h to quote.h