Query Deparsing Support - Mailing list pgsql-hackers

From Jason Petersen
Subject Query Deparsing Support
Date
Msg-id 5E5BB0F8-B05E-47C2-8706-F85E70A6DF7D@citusdata.com
Whole thread Raw
List pgsql-hackers
The DDL deparse support that just landed looks impressive, but I’ve needed query deparsing for some time now. Within pg_shard 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

pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: BackendPidGetProc doesn't return PGPROC for background worker?
Next
From: Tom Lane
Date:
Subject: Re: Patch for bug #12845 (GB18030 encoding)