diff options
author | Bruce Momjian <bruce@momjian.us> | 1997-12-29 04:31:50 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 1997-12-29 04:31:50 +0000 |
commit | a1dd40905304bacfaf4a1bad6a45114e8ccc9e8d (patch) | |
tree | e15b1cc8204aff1506df1cb0b3ec6f5e6b1b2596 /src/backend/optimizer/prep/prepunion.c | |
parent | 499b13c99403a37ceec69d9cc4faec1c86b34e3c (diff) |
Fix for ORDER BY in UNION.
Diffstat (limited to 'src/backend/optimizer/prep/prepunion.c')
-rw-r--r-- | src/backend/optimizer/prep/prepunion.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/backend/optimizer/prep/prepunion.c b/src/backend/optimizer/prep/prepunion.c index 5cb89aac867..e942173a745 100644 --- a/src/backend/optimizer/prep/prepunion.c +++ b/src/backend/optimizer/prep/prepunion.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/prep/prepunion.c,v 1.16 1997/12/29 01:12:48 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/prep/prepunion.c,v 1.17 1997/12/29 04:31:23 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -177,14 +177,12 @@ plan_union_queries(Query *parse) { parse->uniqueFlag = "*"; parse->sortClause = transformSortClause(NULL, NIL, - ((Plan *) lfirst(union_plans))->targetlist, "*"); + parse->sortClause, + parse->targetList, "*"); } else - { /* needed so we don't take the flag from the first query */ parse->uniqueFlag = NULL; - parse->sortClause = NIL; - } parse->havingQual = NULL; parse->qry_numAgg = 0; |