*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/bootstrap/bootparse.y,v 1.33 2000/11/21 21:15:59 petere Exp $
+ * $Header: /cvsroot/pgsql/src/backend/bootstrap/bootparse.y,v 1.34 2001/01/17 17:26:44 momjian Exp $
*
*-------------------------------------------------------------------------
*/
boot_index_params:
boot_index_params COMMA boot_index_param { $$ = lappend($1, $3); }
- | boot_index_param { $$ = lcons($1, NIL); }
+ | boot_index_param { $$ = makeList1($1); }
;
boot_index_param:
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Header: /cvsroot/pgsql/src/backend/commands/user.c,v 1.70 2000/11/16 22:30:19 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/user.c,v 1.71 2001/01/17 17:26:44 momjian Exp $
*
*-------------------------------------------------------------------------
*/
ags.name = strVal(lfirst(item)); /* the group name to add
* this in */
ags.action = +1;
- ags.listUsers = lcons((void *) makeInteger(havesysid ? stmt->sysid : max_id + 1), NIL);
+ ags.listUsers = makeList1(makeInteger(havesysid ?
+ stmt->sysid : max_id + 1));
AlterGroup(&ags, "CREATE USER");
}
datum = heap_getattr(tmp_tuple, Anum_pg_group_groname, pg_dsc, &null);
ags.name = DatumGetCString(DirectFunctionCall1(nameout, datum));
ags.action = -1;
- ags.listUsers = lcons((void *) makeInteger(usesysid), NIL);
+ ags.listUsers = makeList1(makeInteger(usesysid));
AlterGroup(&ags, "DROP USER");
}
heap_endscan(scan);
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/executor/execJunk.c,v 1.22 2000/01/26 05:56:21 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/executor/execJunk.c,v 1.23 2001/01/17 17:26:44 momjian Exp $
*
*-------------------------------------------------------------------------
*/
Fjoin *fjNode = (Fjoin *) tl_node(fjList);
cleanFjoin = (Fjoin) copyObject((Node) fjNode);
- cleanFjList = lcons(cleanFjoin, NIL);
+ cleanFjList = makeList1(cleanFjoin);
resdom = (Resdom) lfirst(get_fj_innerNode(fjNode));
expr = lsecond(get_fj_innerNode(fjNode));
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.136 2001/01/05 06:34:17 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.137 2001/01/17 17:26:44 momjian Exp $
*
*-------------------------------------------------------------------------
*/
if (list == NIL)
return NIL;
- newlist = nl = lcons(lfirst(list), NIL);
+ newlist = nl = makeList1(lfirst(list));
foreach(l, lnext(list))
{
- lnext(nl) = lcons(lfirst(l), NIL);
+ lnext(nl) = makeList1(lfirst(l));
nl = lnext(nl);
}
return newlist;
/* rather ugly coding for speed... */
/* Note the input list cannot be NIL if we got here. */
- nl = lcons(copyObject(lfirst(list)), NIL);
+ nl = makeList1(copyObject(lfirst(list)));
retval = nl;
foreach(l, lnext(list))
{
- lnext(nl) = lcons(copyObject(lfirst(l)), NIL);
+ lnext(nl) = makeList1(copyObject(lfirst(l)));
nl = lnext(nl);
}
}
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/nodes/list.c,v 1.36 2000/10/31 10:22:10 petere Exp $
+ * $Header: /cvsroot/pgsql/src/backend/nodes/list.c,v 1.37 2001/01/17 17:26:44 momjian Exp $
*
* NOTES
* XXX a few of the following functions are duplicated to handle
List *
lappend(List *list, void *obj)
{
- return nconc(list, lcons(obj, NIL));
+ return nconc(list, makeList1(obj));
}
/*
List *
lappendi(List *list, int datum)
{
- return nconc(list, lconsi(datum, NIL));
+ return nconc(list, makeListi1(datum));
}
/*
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/nodes/makefuncs.c,v 1.23 2000/11/16 22:30:23 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/nodes/makefuncs.c,v 1.24 2001/01/17 17:26:44 momjian Exp $
*
* NOTES
* Creator functions in POSTGRES 4.2 are generated automatically. Most of
a->relname = pstrdup(relname);
a->paramNo = NULL;
if (attname != NULL)
- a->attrs = lcons(makeString(pstrdup(attname)), NIL);
+ a->attrs = makeList1(makeString(pstrdup(attname)));
a->indirection = NULL;
return a;
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: geqo_eval.c,v 1.55 2000/09/19 18:42:33 tgl Exp $
+ * $Id: geqo_eval.c,v 1.56 2001/01/17 17:26:44 momjian Exp $
*
*-------------------------------------------------------------------------
*/
else
{
/* tree main part */
- List *acceptable_rels = lcons(inner_rel, NIL);
+ List *acceptable_rels = makeList1(inner_rel);
List *new_rels;
RelOptInfo *new_rel;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/optimizer/path/_deadcode/Attic/xfunc.c,v 1.13 2000/01/26 05:56:36 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/optimizer/path/_deadcode/Attic/xfunc.c,v 1.14 2001/01/17 17:26:45 momjian Exp $
*
*-------------------------------------------------------------------------
*/
get_clause(cinfo), LispNil);
xfunc_copyrel(get_parent(newkid), &newrel);
set_parent(newkid, newrel);
- set_pathlist(newrel, lcons(newkid, NIL));
+ set_pathlist(newrel, makeList1(newkid));
set_unorderedpath(newrel, (PathPtr) newkid);
set_cheapestpath(newrel, (PathPtr) newkid);
set_size(newrel,
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/optimizer/path/pathkeys.c,v 1.28 2000/12/14 22:30:43 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/optimizer/path/pathkeys.c,v 1.29 2001/01/17 17:26:45 momjian Exp $
*
*-------------------------------------------------------------------------
*/
/* Build the new set only when we know we must */
if (newset == NIL)
- newset = lcons(item1, lcons(item2, NIL));
+ newset = makeList2(item1, item2);
/* Found a set to merge into our new set */
newset = set_union(newset, curset);
/* Build the new set only when we know we must */
if (newset == NIL)
- newset = lcons(item1, lcons(item2, NIL));
+ newset = makeList2(item1, item2);
root->equi_key_list = lcons(newset, root->equi_key_list);
}
/* Make a one-sublist pathkeys list for the function expression */
item = makePathKeyItem((Node *) make_funcclause(funcnode, funcargs),
sortop);
- retval = lcons(make_canonical_pathkey(root, item), NIL);
+ retval = makeList1(make_canonical_pathkey(root, item));
}
else
{
* canonicalize_pathkeys() might replace it with a longer sublist
* later.
*/
- pathkeys = lappend(pathkeys, lcons(pathkey, NIL));
+ pathkeys = lappend(pathkeys, makeList1(pathkey));
}
return pathkeys;
}
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/optimizer/prep/prepunion.c,v 1.58 2000/12/14 22:30:44 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/optimizer/prep/prepunion.c,v 1.59 2001/01/17 17:26:45 momjian Exp $
*
*-------------------------------------------------------------------------
*/
find_all_inheritors(Oid parentrel)
{
List *examined_relids = NIL;
- List *unexamined_relids = lconsi(parentrel, NIL);
+ List *unexamined_relids = makeListi1(parentrel);
/*
* While the queue of unexamined relids is nonempty, remove the first
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.215 2001/01/15 20:36:36 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.216 2001/01/17 17:26:45 momjian Exp $
*
* HISTORY
* AUTHOR DATE MAJOR EVENT
}
| LOCATION '=' DEFAULT
{
- $$ = lconsi(1, makeList1((char *) NULL));
+ $$ = lconsi(1, makeList1(NULL));
}
| TEMPLATE '=' name
{
}
| TEMPLATE '=' DEFAULT
{
- $$ = lconsi(2, makeList1((char *) NULL));
+ $$ = lconsi(2, makeList1(NULL));
}
| ENCODING '=' Sconst
{
/* easy way to return two values. Can someone improve this? bjm */
into_clause: INTO OptTempTableName { $$ = $2; }
- | /*EMPTY*/ { $$ = lcons(makeInteger(FALSE), NIL); }
+ | /*EMPTY*/ { $$ = makeList1(makeInteger(FALSE)); }
;
/*
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/parser/parse_coerce.c,v 2.52 2000/12/17 04:32:29 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/parser/parse_coerce.c,v 2.53 2001/01/17 17:26:45 momjian Exp $
*
*-------------------------------------------------------------------------
*/
FuncCall *n = makeNode(FuncCall);
n->funcname = typeidTypeName(targetTypeId);
- n->args = lcons(node, NIL);
+ n->args = makeList1(node);
n->agg_star = false;
n->agg_distinct = false;
cons->val.val.ival = atttypmod;
func->funcname = funcname;
- func->args = lappend(lcons(node, NIL), cons);
+ func->args = makeList2(node, cons);
func->agg_star = false;
func->agg_distinct = false;