File tree 1 file changed +6
-7
lines changed
1 file changed +6
-7
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/utils/sort/Attic/psort.c,v 1.33 1998/01/25 05:14:49 momjian Exp $
10
+ * $Header: /cvsroot/pgsql/src/backend/utils/sort/Attic/psort.c,v 1.34 1998/01/25 05:18:34 scrappy Exp $
11
11
*
12
12
* NOTES
13
13
* Sorts the first relation into the second relation.
@@ -1094,7 +1094,7 @@ _psort_cmp (HeapTuple *ltup, HeapTuple *rtup)
1094
1094
int result = 0 ;
1095
1095
bool isnull1 , isnull2 ;
1096
1096
1097
- while ( nkey < PsortNkeys && !result )
1097
+ for ( nkey = 0 ; nkey < PsortNkeys && !result ; nkey ++ )
1098
1098
{
1099
1099
lattr = heap_getattr (* ltup , InvalidBuffer ,
1100
1100
PsortKeys [nkey ].sk_attno ,
@@ -1106,14 +1106,13 @@ _psort_cmp (HeapTuple *ltup, HeapTuple *rtup)
1106
1106
& isnull2 );
1107
1107
if ( isnull1 )
1108
1108
{
1109
- if ( isnull2 )
1110
- return (0 );
1111
- return (1 );
1109
+ if ( !isnull2 )
1110
+ result = 1 ;
1112
1111
}
1113
1112
else if ( isnull2 )
1114
- return ( -1 ) ;
1113
+ result = -1 ;
1115
1114
1116
- if (PsortKeys [nkey ].sk_flags & SK_COMMUTE )
1115
+ else if (PsortKeys [nkey ].sk_flags & SK_COMMUTE )
1117
1116
{
1118
1117
if (!(result = - (long ) (* fmgr_faddr (& PsortKeys [nkey ].sk_func )) (rattr , lattr )))
1119
1118
result = (long ) (* fmgr_faddr (& PsortKeys [nkey ].sk_func )) (lattr , rattr );
You can’t perform that action at this time.
0 commit comments