Deparsed SQL in rewriteHandler

From: Amol Bhangdiya <amol(dot)b89(at)gmail(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Deparsed SQL in rewriteHandler
Date: 2012-10-23 18:29:24
Message-ID: CADaB4eC=fhc2pOtfiQvNAv0MB7WfuKPsBi9uFw8HFEyEywisBA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: 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.

Browse pgsql-novice by date

  From Date Subject
Next Message Josh Kupershmidt 2012-10-24 05:55:32 Re: "Voting" question?
Previous Message Alex Cornford 2012-10-23 14:56:11 Grant / Revoke on Views and prepared statements