1111 * Portions Copyright (c) 1994, Regents of the University of California
1212 *
1313 * 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 $
1515 *
1616 *-------------------------------------------------------------------------
1717 */
@@ -119,7 +119,7 @@ add_equijoined_keys(Query *root, RestrictInfo *restrictinfo)
119119
120120/* Build the new set only when we know we must */
121121if (newset == NIL )
122- newset = lcons (item1 ,lcons ( item2 , NIL ) );
122+ newset = makeList2 (item1 ,item2 );
123123
124124/* Found a set to merge into our new set */
125125newset = set_union (newset ,curset );
@@ -135,7 +135,7 @@ add_equijoined_keys(Query *root, RestrictInfo *restrictinfo)
135135
136136/* Build the new set only when we know we must */
137137if (newset == NIL )
138- newset = lcons (item1 ,lcons ( item2 , NIL ) );
138+ newset = makeList2 (item1 ,item2 );
139139
140140root -> equi_key_list = lcons (newset ,root -> equi_key_list );
141141}
@@ -534,7 +534,7 @@ build_index_pathkeys(Query *root,
534534/* Make a one-sublist pathkeys list for the function expression */
535535item = makePathKeyItem ((Node * )make_funcclause (funcnode ,funcargs ),
536536sortop );
537- retval = lcons (make_canonical_pathkey (root ,item ), NIL );
537+ retval = makeList1 (make_canonical_pathkey (root ,item ));
538538}
539539else
540540{
@@ -678,7 +678,7 @@ make_pathkeys_for_sortclauses(List *sortclauses,
678678 * canonicalize_pathkeys() might replace it with a longer sublist
679679 * later.
680680 */
681- pathkeys = lappend (pathkeys ,lcons (pathkey , NIL ));
681+ pathkeys = lappend (pathkeys ,makeList1 (pathkey ));
682682}
683683return pathkeys ;
684684}