Query Deparsing Support

Started by Jason Petersenover 10 years ago1 messages
#1Jason Petersen
jason@citusdata.com

The DDL deparse support that just landed looks impressive, but I’ve needed query deparsing for some time now. Within pg_shard <https://github.com/citusdata/pg_shard&gt; we took the fast-and-dirty approach of merging in a modified ruleutils.c, though I’d (obviously) like to get away from that.

Many of ruleutils.c’s functions already have a public interface; would there be any objection to exposing get_query_def to provide a way to turn a Query back into an SQL string?

A more structured approach analogous to the new DDL stuff would make my life easier, but simply having the Query-to-SQL function would be a huge improvement for now.

I trawled through the archives but couldn’t find any discussion of why this function was kept static.

--
Jason Petersen
Software Engineer | Citus Data
303.736.9255
jason@citusdata.com