Deparsed SQL in rewriteHandler - Mailing list pgsql-novice

From Amol Bhangdiya
Subject Deparsed SQL in rewriteHandler
Date
Msg-id CADaB4eC=fhc2pOtfiQvNAv0MB7WfuKPsBi9uFw8HFEyEywisBA@mail.gmail.com
Whole thread Raw
List pgsql-novice
Is there a way to get SQL as a string from parse tree(Query *) in rewriteHandler? I tried to look into some part of code and found function get_select_query_def() in ruleutils.c but I am not sure how to use that function.
I want to add extra condition in where clause, for that first I would deparse parse tree, add condition and parse the modified SQL again.

pgsql-novice by date:

Previous
From: Alex Cornford
Date:
Subject: Grant / Revoke on Views and prepared statements
Next
From: Josh Kupershmidt
Date:
Subject: Re: "Voting" question?