Commit 79f99a38 authored by Bruce Momjian's avatar Bruce Momjian

Fix for psort. fixes regression tests.

parent a654db30
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/parse_expr.c,v 1.13 1998/02/01 19:43:37 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/parser/parse_expr.c,v 1.14 1998/02/01 22:20:39 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -252,14 +252,14 @@ transformExpr(ParseState *pstate, Node *expr, int precedence) ...@@ -252,14 +252,14 @@ transformExpr(ParseState *pstate, Node *expr, int precedence)
lfirst(llist) = transformExpr(pstate, lfirst(llist), precedence); lfirst(llist) = transformExpr(pstate, lfirst(llist), precedence);
if (length(sublink->lefthand) != if (length(sublink->lefthand) !=
length(sublink->subselect->targetList)) length(((Query *)sublink->subselect)->targetList))
elog(ERROR,"Subselect has too many or too few fields."); elog(ERROR,"Subselect has too many or too few fields.");
if (sublink->subLinkType != EXISTS_SUBLINK) if (sublink->subLinkType != EXISTS_SUBLINK)
{ {
char *op = lfirst(sublink->oper); char *op = lfirst(sublink->oper);
List *left_expr = sublink->lefthand; List *left_expr = sublink->lefthand;
List *right_expr = sublink->subselect->targetList; List *right_expr = ((Query *)sublink->subselect)->targetList;
List *elist; List *elist;
sublink->oper = NIL; sublink->oper = NIL;
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/sort/Attic/psort.c,v 1.35 1998/01/31 04:39:13 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/utils/sort/Attic/psort.c,v 1.36 1998/02/01 22:20:47 momjian Exp $
* *
* NOTES * NOTES
* Sorts the first relation into the second relation. * Sorts the first relation into the second relation.
...@@ -1090,7 +1090,7 @@ static int ...@@ -1090,7 +1090,7 @@ static int
_psort_cmp (HeapTuple *ltup, HeapTuple *rtup) _psort_cmp (HeapTuple *ltup, HeapTuple *rtup)
{ {
register Datum lattr, rattr; register Datum lattr, rattr;
int nkey = 0; int nkey;
int result = 0; int result = 0;
bool isnull1, isnull2; bool isnull1, isnull2;
...@@ -1119,7 +1119,6 @@ _psort_cmp (HeapTuple *ltup, HeapTuple *rtup) ...@@ -1119,7 +1119,6 @@ _psort_cmp (HeapTuple *ltup, HeapTuple *rtup)
} }
else if (!(result = -(long) (*fmgr_faddr(&PsortKeys[nkey].sk_func)) (lattr, rattr))) else if (!(result = -(long) (*fmgr_faddr(&PsortKeys[nkey].sk_func)) (lattr, rattr)))
result = (long) (*fmgr_faddr(&PsortKeys[nkey].sk_func)) (rattr, lattr); result = (long) (*fmgr_faddr(&PsortKeys[nkey].sk_func)) (rattr, lattr);
nkey++;
} }
return (result); return (result);
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment