Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc37ecaf

Browse files
committed
Fix errors in SELECT ... GROUP BY ... UNION SELECT ...
ye proverbial one-line patch (not counting five lines of comment so'smaybe it won't happen again)
1 parent878d952 commitc37ecaf

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

‎src/backend/optimizer/prep/prepunion.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* 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 $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -192,6 +192,13 @@ plan_union_queries(Query *parse)
192192
/* needed so we don't take the flag from the first query */
193193
parse->uniqueFlag=NULL;
194194

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;
195202
parse->havingQual=NULL;
196203
parse->hasAggs= false;
197204

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp