citus/src/backend/distributed/deparser
Nils Dijk d77e386e92 force aliases in deparsing for queries with anonymous column references (#4011)
DESCRIPTION: Force aliases in deparsing for queries with anonymous column references

Fixes: #3985

The root cause has todo with discrepancies in the query tree we create. I think in the future we should spend some time on categorising all changes we made to ruleutils and see if we can change the data structure `query` we pass to the deparser to have an actual valid postgres query for the deparser to render.

For now the fix is to keep track, besides changing the names of the entries in the target list, also if we have a reference to an anonymous columns. If there are anonymous columns we set the `printaliases` flag to true which forces the deparser to add the aliases.
(cherry picked from commit 449d1f0e91)
2020-07-21 11:01:49 +03:00
..
citus_ruleutils.c Make static analysis happier (#4008) 2020-07-21 11:01:49 +03:00
deparse.c Introduce GetDistributeObjectOps to organize dispatch of logic dependent on node/object type 2020-01-09 18:24:29 +00:00
deparse_attribute_stmts.c Introduce GetDistributeObjectOps to organize dispatch of logic dependent on node/object type 2020-01-09 18:24:29 +00:00
deparse_collation_stmts.c Introduce GetDistributeObjectOps to organize dispatch of logic dependent on node/object type 2020-01-09 18:24:29 +00:00
deparse_extension_stmts.c Refactor the deparsing of a CREATE EXTENSION to prevent NULL POINTER dereferences (#3518) 2020-03-04 16:47:07 +01:00
deparse_function_stmts.c Propagate ALTER ROLE .. SET statements 2020-03-27 13:02:48 +03:00
deparse_role_stmts.c Refactor alter role to work on distributed roles (#3739) 2020-04-16 12:23:27 +02:00
deparse_schema_stmts.c Adds propagation for grant on schema commands 2020-01-20 14:51:28 +03:00
deparse_table_stmts.c Adds alter table schema propagation 2020-01-16 17:04:16 +03:00
deparse_type_stmts.c Fix composite create type deparsing to preserve typmod 2020-05-15 13:12:54 +00:00
format_collate.c remove copyright years (#3286) 2019-12-11 21:14:08 +03:00
objectaddress.c Introduce GetDistributeObjectOps to organize dispatch of logic dependent on node/object type 2020-01-09 18:24:29 +00:00
qualify.c Introduce GetDistributeObjectOps to organize dispatch of logic dependent on node/object type 2020-01-09 18:24:29 +00:00
qualify_collation_stmt.c Introduce GetDistributeObjectOps to organize dispatch of logic dependent on node/object type 2020-01-09 18:24:29 +00:00
qualify_function_stmt.c Propagate DROP ROUTINE, ALTER ROUTINE 2020-01-13 15:37:46 +00:00
qualify_role_stmt.c Accept list of values in a supported ALTER ROLE .. SET statement 2020-07-21 04:12:39 +03:00
qualify_table_stmt.c Adds alter table schema propagation 2020-01-16 17:04:16 +03:00
qualify_type_stmt.c move MakeNameListFromRangeVar function to a more appropriate file 2020-03-25 11:01:50 +03:00
ruleutils_11.c force aliases in deparsing for queries with anonymous column references (#4011) 2020-07-21 11:01:49 +03:00
ruleutils_12.c force aliases in deparsing for queries with anonymous column references (#4011) 2020-07-21 11:01:49 +03:00