aboutsummaryrefslogtreecommitdiff
path: root/src/backend/parser/parse_expr.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2022-03-28 11:19:29 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2022-03-28 11:19:37 -0400
commitd22646922d66012705e0e2948cfb5b4a07092a29 (patch)
treea164d1fb3006ff27218171b94e1343a67ebf1574 /src/backend/parser/parse_expr.c
parent386ca0abf4107721a363f1c152cd026041b609ea (diff)
downloadpostgresql-d22646922d66012705e0e2948cfb5b4a07092a29.tar.gz
postgresql-d22646922d66012705e0e2948cfb5b4a07092a29.zip
Add public ruleutils.c entry point to deparse a Query.
This has no in-core callers but will be wanted by extensions. It's just a thin wrapper around get_query_def, so it adds little code. Also, fix get_from_clause_item() to force insertion of an alias for a SUBQUERY RTE item. This is irrelevant to existing uses because RTE_SUBQUERY items made by the parser always have aliases already. However, if one tried to use pg_get_querydef() to inspect a post-rewrite Query, it could be an issue. In any case, get_from_clause_item already contained logic to force alias insertion for VALUES items, so the lack of the same for SUBQUERY is a pretty clear oversight. In passing, replace duplicated code for selection of pretty-print options with a common macro. Julien Rouhaud, reviewed by Pavel Stehule, Gilles Darold, and myself Discussion: https://postgr.es/m/20210627041138.zklczwmu3ms4ufnk@nol
Diffstat (limited to 'src/backend/parser/parse_expr.c')
0 files changed, 0 insertions, 0 deletions