11
11
* Portions Copyright (c) 1994, Regents of the University of California
12
12
*
13
13
* IDENTIFICATION
14
- * $Header: /cvsroot/pgsql/src/backend/optimizer/path/pathkeys.c,v 1.28 2000/12/14 22:30:43 tgl Exp $
14
+ * $Header: /cvsroot/pgsql/src/backend/optimizer/path/pathkeys.c,v 1.29 2001/01/17 17:26:45 momjian Exp $
15
15
*
16
16
*-------------------------------------------------------------------------
17
17
*/
@@ -119,7 +119,7 @@ add_equijoined_keys(Query *root, RestrictInfo *restrictinfo)
119
119
120
120
/* Build the new set only when we know we must */
121
121
if (newset == NIL )
122
- newset = lcons (item1 , lcons ( item2 , NIL ) );
122
+ newset = makeList2 (item1 , item2 );
123
123
124
124
/* Found a set to merge into our new set */
125
125
newset = set_union (newset , curset );
@@ -135,7 +135,7 @@ add_equijoined_keys(Query *root, RestrictInfo *restrictinfo)
135
135
136
136
/* Build the new set only when we know we must */
137
137
if (newset == NIL )
138
- newset = lcons (item1 , lcons ( item2 , NIL ) );
138
+ newset = makeList2 (item1 , item2 );
139
139
140
140
root -> equi_key_list = lcons (newset , root -> equi_key_list );
141
141
}
@@ -534,7 +534,7 @@ build_index_pathkeys(Query *root,
534
534
/* Make a one-sublist pathkeys list for the function expression */
535
535
item = makePathKeyItem ((Node * ) make_funcclause (funcnode , funcargs ),
536
536
sortop );
537
- retval = lcons (make_canonical_pathkey (root , item ), NIL );
537
+ retval = makeList1 (make_canonical_pathkey (root , item ));
538
538
}
539
539
else
540
540
{
@@ -678,7 +678,7 @@ make_pathkeys_for_sortclauses(List *sortclauses,
678
678
* canonicalize_pathkeys() might replace it with a longer sublist
679
679
* later.
680
680
*/
681
- pathkeys = lappend (pathkeys , lcons (pathkey , NIL ));
681
+ pathkeys = lappend (pathkeys , makeList1 (pathkey ));
682
682
}
683
683
return pathkeys ;
684
684
}
0 commit comments