File tree 1 file changed +8
-1
lines changed
src/backend/optimizer/prep
1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 7
7
*
8
8
*
9
9
* IDENTIFICATION
10
- * $Header: /cvsroot/pgsql/src/backend/optimizer/prep/prepunion.c,v 1.32 1999/06/06 17:38:11 tgl Exp $
10
+ * $Header: /cvsroot/pgsql/src/backend/optimizer/prep/prepunion.c,v 1.33 1999/06/10 06:55:40 tgl Exp $
11
11
*
12
12
*-------------------------------------------------------------------------
13
13
*/
@@ -192,6 +192,13 @@ plan_union_queries(Query *parse)
192
192
/* needed so we don't take the flag from the first query */
193
193
parse -> uniqueFlag = NULL ;
194
194
195
+ /* Make sure we don't try to apply the first query's grouping stuff
196
+ * to the Append node, either. Basically we don't want union_planner
197
+ * to do anything when we return control, except add the top sort/unique
198
+ * nodes for DISTINCT processing if this wasn't UNION ALL, or the top
199
+ * sort node if it was UNION ALL with a user-provided sort clause.
200
+ */
201
+ parse -> groupClause = NULL ;
195
202
parse -> havingQual = NULL ;
196
203
parse -> hasAggs = false;
197
204
You can’t perform that action at this time.
0 commit comments