Обсуждение: Query Deparsing Support

Поиск
Список
Период
Сортировка

Query Deparsing Support

От
Jason Petersen
Дата:
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