Fix sorting of multiple fields broken with UNION.
This commit is contained in:
parent
4557c846de
commit
e22b09c227
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/parser/parse_clause.c,v 1.7 1998/01/05 03:32:26 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/parser/parse_clause.c,v 1.8 1998/01/06 23:58:05 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -263,7 +263,6 @@ transformSortClause(ParseState *pstate,
|
|||||||
TargetEntry *restarget;
|
TargetEntry *restarget;
|
||||||
Resdom *resdom;
|
Resdom *resdom;
|
||||||
|
|
||||||
sortlist = NIL; /* we create it on the fly here */
|
|
||||||
|
|
||||||
restarget = find_targetlist_entry(pstate, sortby, targetlist);
|
restarget = find_targetlist_entry(pstate, sortby, targetlist);
|
||||||
if (restarget == NULL)
|
if (restarget == NULL)
|
||||||
@ -274,9 +273,7 @@ transformSortClause(ParseState *pstate,
|
|||||||
resdom->restype,
|
resdom->restype,
|
||||||
resdom->restype, false));
|
resdom->restype, false));
|
||||||
if (sortlist == NIL)
|
if (sortlist == NIL)
|
||||||
{
|
|
||||||
s = sortlist = lcons(sortcl, NIL);
|
s = sortlist = lcons(sortcl, NIL);
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
List *i;
|
List *i;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user