Remove incorrect assertion from Postgres ruleutils. (#8136)

DESCRIPTION: Remove an assertion from Postgres ruleutils that was rendered meaningless by a previous Citus commit.

Fixes #8123. This has been present since 00068e0, which changed the code preceding the assert as follows:
```
-	while (i < colinfo->num_cols && colinfo->colnames[i] == NULL)
-		i++;
+	for (int col_index = 0; col_index < colinfo->num_cols; col_index++)
+	{
+		/*
+		 * In the above processing-loops, "i" advances only if
+		 * the column is not new, check if this is a new column.
+		 */
+		if (colinfo->is_new_col[col_index])
+			i++;
+	}
	Assert(i == colinfo->num_cols);
	Assert(j == nnewcolumns);
```

This commit altered both the loop condition and the incrementing of `i`. After analysis, the assert no longer makes sense.

cherry-picked from bd0558fe39
release-12.1-onur
Colm 2025-08-19 15:52:13 +01:00 committed by Naisila Puka
parent be7cb46ddf
commit d7c48a9d1e
3 changed files with 0 additions and 3 deletions

View File

@ -1535,7 +1535,6 @@ set_join_column_names(deparse_namespace *dpns, RangeTblEntry *rte,
if (colinfo->is_new_col[col_index])
i++;
}
Assert(i == colinfo->num_cols);
Assert(j == nnewcolumns);
#endif

View File

@ -1572,7 +1572,6 @@ set_join_column_names(deparse_namespace *dpns, RangeTblEntry *rte,
if (colinfo->is_new_col[col_index])
i++;
}
Assert(i == colinfo->num_cols);
Assert(j == nnewcolumns);
#endif

View File

@ -1589,7 +1589,6 @@ set_join_column_names(deparse_namespace *dpns, RangeTblEntry *rte,
if (colinfo->is_new_col[col_index])
i++;
}
Assert(i == colinfo->num_cols);
Assert(j == nnewcolumns);
#endif