reshke commented on issue #1695:
URL: https://github.com/apache/cloudberry/issues/1695#issuecomment-4304260816
14345f3c6a7 conflicts:
```
reshke@yezzey-cbdb-bench:~/cloudberry$ git diff
src/backend/utils/adt/ruleutils.c
diff --cc src/backend/utils/adt/ruleutils.c
index bf663afb3c5,29b2e4f5d84..00000000000
--- a/src/backend/utils/adt/ruleutils.c
+++ b/src/backend/utils/adt/ruleutils.c
@@@ -11382,54 -10959,7 +11385,58 @@@ get_from_clause_item(Node *jtnode, Quer
}
/* Print the relation alias, if needed */
++<<<<<<< HEAD
+ printalias = false;
+ if (rte->alias != NULL)
+ {
+ /* Always print alias if user provided one */
+ printalias = true;
+ }
+ else if (colinfo->printaliases)
+ {
+ /* Always print alias if we need to print column
aliases */
+ printalias = true;
+ }
+ else if (rte->rtekind == RTE_RELATION)
+ {
+ /*
+ * No need to print alias if it's same as relation
name (this
+ * would normally be the case, but not if
set_rtable_names had to
+ * resolve a conflict).
+ */
+ if (strcmp(refname, get_relation_name(rte->relid))
!= 0)
+ printalias = true;
+ }
+ else if (rte->rtekind == RTE_FUNCTION || rte->rtekind ==
RTE_TABLEFUNCTION)
+ {
+ /*
+ * For a function RTE, always print alias. This
covers possible
+ * renaming of the function and/or instability of the
+ * FigureColname rules for things that aren't simple
functions.
+ * Note we'd need to force it anyway for the
columndef list case.
+ */
+ printalias = true;
+ }
+ else if (rte->rtekind == RTE_VALUES)
+ {
+ /* Alias is syntactically required for VALUES */
+ printalias = true;
+ }
+ else if (rte->rtekind == RTE_CTE)
+ {
+ /*
+ * No need to print alias if it's same as CTE name
(this would
+ * normally be the case, but not if set_rtable_names
had to
+ * resolve a conflict).
+ */
+ if (strcmp(refname, rte->ctename) != 0)
+ printalias = true;
+ }
+ if (printalias)
+ appendStringInfo(buf, " %s",
quote_identifier(refname));
++=======
+ get_rte_alias(rte, varno, false, context);
++>>>>>>> 14345f3c6a7 (Print the correct aliases for DML target tables in
ruleutils.)
/* Print the column definitions or aliases, if needed */
if (rtfunc1 && rtfunc1->funccolnames != NIL)
reshke@yezzey-cbdb-bench:~/cloudberry$
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]