Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
5088f074
Commit
5088f074
authored
Jan 17, 2001
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change lcons(x, NIL) to makeList(x) where appropriate.
parent
8e984038
Changes
12
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
36 additions
and
35 deletions
+36
-35
src/backend/bootstrap/bootparse.y
src/backend/bootstrap/bootparse.y
+2
-2
src/backend/commands/user.c
src/backend/commands/user.c
+4
-3
src/backend/executor/execJunk.c
src/backend/executor/execJunk.c
+2
-2
src/backend/nodes/copyfuncs.c
src/backend/nodes/copyfuncs.c
+5
-5
src/backend/nodes/list.c
src/backend/nodes/list.c
+3
-3
src/backend/nodes/makefuncs.c
src/backend/nodes/makefuncs.c
+2
-2
src/backend/optimizer/geqo/geqo_eval.c
src/backend/optimizer/geqo/geqo_eval.c
+2
-2
src/backend/optimizer/path/_deadcode/xfunc.c
src/backend/optimizer/path/_deadcode/xfunc.c
+2
-2
src/backend/optimizer/path/pathkeys.c
src/backend/optimizer/path/pathkeys.c
+5
-5
src/backend/optimizer/prep/prepunion.c
src/backend/optimizer/prep/prepunion.c
+2
-2
src/backend/parser/gram.y
src/backend/parser/gram.y
+4
-4
src/backend/parser/parse_coerce.c
src/backend/parser/parse_coerce.c
+3
-3
No files found.
src/backend/bootstrap/bootparse.y
View file @
5088f074
...
...
@@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/bootstrap/bootparse.y,v 1.3
3 2000/11/21 21:15:59 petere
Exp $
* $Header: /cvsroot/pgsql/src/backend/bootstrap/bootparse.y,v 1.3
4 2001/01/17 17:26:44 momjian
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -254,7 +254,7 @@ Boot_BuildIndsStmt:
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:
...
...
src/backend/commands/user.c
View file @
5088f074
...
...
@@ -6,7 +6,7 @@
* 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.7
0 2000/11/16 22:30:19 tgl
Exp $
* $Header: /cvsroot/pgsql/src/backend/commands/user.c,v 1.7
1 2001/01/17 17:26:44 momjian
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -311,7 +311,8 @@ CreateUser(CreateUserStmt *stmt)
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"
);
}
...
...
@@ -600,7 +601,7 @@ DropUser(DropUserStmt *stmt)
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
);
...
...
src/backend/executor/execJunk.c
View file @
5088f074
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/execJunk.c,v 1.2
2 2000/01/26 05:56:21
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/executor/execJunk.c,v 1.2
3 2001/01/17 17:26:44
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -124,7 +124,7 @@ ExecInitJunkFilter(List *targetList, TupleDesc tupType)
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
));
...
...
src/backend/nodes/copyfuncs.c
View file @
5088f074
...
...
@@ -15,7 +15,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.13
6 2001/01/05 06:34:17 tgl
Exp $
* $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.13
7 2001/01/17 17:26:44 momjian
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -58,11 +58,11 @@ listCopy(List *list)
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
;
...
...
@@ -2745,12 +2745,12 @@ copyObject(void *from)
/* 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
);
}
}
...
...
src/backend/nodes/list.c
View file @
5088f074
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/list.c,v 1.3
6 2000/10/31 10:22:10 petere
Exp $
* $Header: /cvsroot/pgsql/src/backend/nodes/list.c,v 1.3
7 2001/01/17 17:26:44 momjian
Exp $
*
* NOTES
* XXX a few of the following functions are duplicated to handle
...
...
@@ -127,7 +127,7 @@ lconsi(int datum, List *list)
List
*
lappend
(
List
*
list
,
void
*
obj
)
{
return
nconc
(
list
,
lcons
(
obj
,
NIL
));
return
nconc
(
list
,
makeList1
(
obj
));
}
/*
...
...
@@ -138,7 +138,7 @@ lappend(List *list, void *obj)
List
*
lappendi
(
List
*
list
,
int
datum
)
{
return
nconc
(
list
,
lconsi
(
datum
,
NIL
));
return
nconc
(
list
,
makeListi1
(
datum
));
}
/*
...
...
src/backend/nodes/makefuncs.c
View file @
5088f074
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/makefuncs.c,v 1.2
3 2000/11/16 22:30:23 tgl
Exp $
* $Header: /cvsroot/pgsql/src/backend/nodes/makefuncs.c,v 1.2
4 2001/01/17 17:26:44 momjian
Exp $
*
* NOTES
* Creator functions in POSTGRES 4.2 are generated automatically. Most of
...
...
@@ -178,7 +178,7 @@ makeAttr(char *relname, char *attname)
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
;
...
...
src/backend/optimizer/geqo/geqo_eval.c
View file @
5088f074
...
...
@@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
* $Id: geqo_eval.c,v 1.5
5 2000/09/19 18:42:33 tgl
Exp $
* $Id: geqo_eval.c,v 1.5
6 2001/01/17 17:26:44 momjian
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -122,7 +122,7 @@ gimme_tree(Query *root, List *initial_rels,
else
{
/* tree main part */
List
*
acceptable_rels
=
lcons
(
inner_rel
,
NIL
);
List
*
acceptable_rels
=
makeList1
(
inner_rel
);
List
*
new_rels
;
RelOptInfo
*
new_rel
;
...
...
src/backend/optimizer/path/_deadcode/xfunc.c
View file @
5088f074
...
...
@@ -10,7 +10,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/_deadcode/Attic/xfunc.c,v 1.1
3 2000/01/26 05:56:36
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/_deadcode/Attic/xfunc.c,v 1.1
4 2001/01/17 17:26:45
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -300,7 +300,7 @@ xfunc_pullup(Query *queryInfo,
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
,
...
...
src/backend/optimizer/path/pathkeys.c
View file @
5088f074
...
...
@@ -11,7 +11,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/pathkeys.c,v 1.2
8 2000/12/14 22:30:43 tgl
Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/pathkeys.c,v 1.2
9 2001/01/17 17:26:45 momjian
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -119,7 +119,7 @@ add_equijoined_keys(Query *root, RestrictInfo *restrictinfo)
/* 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
);
...
...
@@ -135,7 +135,7 @@ add_equijoined_keys(Query *root, RestrictInfo *restrictinfo)
/* 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
);
}
...
...
@@ -534,7 +534,7 @@ build_index_pathkeys(Query *root,
/* 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
{
...
...
@@ -678,7 +678,7 @@ make_pathkeys_for_sortclauses(List *sortclauses,
* canonicalize_pathkeys() might replace it with a longer sublist
* later.
*/
pathkeys
=
lappend
(
pathkeys
,
lcons
(
pathkey
,
NIL
));
pathkeys
=
lappend
(
pathkeys
,
makeList1
(
pathkey
));
}
return
pathkeys
;
}
...
...
src/backend/optimizer/prep/prepunion.c
View file @
5088f074
...
...
@@ -14,7 +14,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/prep/prepunion.c,v 1.5
8 2000/12/14 22:30:44 tgl
Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/prep/prepunion.c,v 1.5
9 2001/01/17 17:26:45 momjian
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -467,7 +467,7 @@ List *
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
...
...
src/backend/parser/gram.y
View file @
5088f074
...
...
@@ -11,7 +11,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.21
5 2001/01/15 20:36:36 tgl
Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.21
6 2001/01/17 17:26:45 momjian
Exp $
*
* HISTORY
* AUTHOR DATE MAJOR EVENT
...
...
@@ -2918,7 +2918,7 @@ createdb_opt_item: LOCATION '=' Sconst
}
| LOCATION '=' DEFAULT
{
$$ = lconsi(1, makeList1(
(char *)
NULL));
$$ = lconsi(1, makeList1(NULL));
}
| TEMPLATE '=' name
{
...
...
@@ -2926,7 +2926,7 @@ createdb_opt_item: LOCATION '=' Sconst
}
| TEMPLATE '=' DEFAULT
{
$$ = lconsi(2, makeList1(
(char *)
NULL));
$$ = lconsi(2, makeList1(NULL));
}
| ENCODING '=' Sconst
{
...
...
@@ -3383,7 +3383,7 @@ simple_select: SELECT opt_distinct target_list
/* 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)
); }
;
/*
...
...
src/backend/parser/parse_coerce.c
View file @
5088f074
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/parse_coerce.c,v 2.5
2 2000/12/17 04:32:29 tgl
Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/parse_coerce.c,v 2.5
3 2001/01/17 17:26:45 momjian
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -128,7 +128,7 @@ coerce_type(ParseState *pstate, Node *node, Oid inputTypeId,
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
;
...
...
@@ -304,7 +304,7 @@ coerce_type_typmod(ParseState *pstate, Node *node,
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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment