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
ceb233ed
Commit
ceb233ed
authored
Feb 22, 1999
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
more cleanup
parent
1ed5cbbf
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
80 additions
and
7 deletions
+80
-7
src/backend/nodes/list.c
src/backend/nodes/list.c
+75
-2
src/backend/optimizer/path/joinrels.c
src/backend/optimizer/path/joinrels.c
+5
-5
No files found.
src/backend/nodes/list.c
View file @
ceb233ed
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/list.c,v 1.1
8 1999/02/22 05:26:18
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/nodes/list.c,v 1.1
9 1999/02/22 06:08:47
momjian Exp $
*
* NOTES
* XXX a few of the following functions are duplicated to handle
...
...
@@ -29,6 +29,11 @@
#include "utils/elog.h"
#include "utils/palloc.h"
/*
* makeList
*
* Take varargs, terminated by -1, and make a List
*/
List
*
makeList
(
void
*
elem
,...)
{
...
...
@@ -57,6 +62,11 @@ makeList(void *elem,...)
return
retval
;
}
/*
* lcons
*
* Add obj to the front of list, or make a new list if 'list' is NIL
*/
List
*
lcons
(
void
*
obj
,
List
*
list
)
{
...
...
@@ -67,6 +77,11 @@ lcons(void *obj, List *list)
return
l
;
}
/*
* lconsi
*
* Same as lcons, but for integer data
*/
List
*
lconsi
(
int
datum
,
List
*
list
)
{
...
...
@@ -77,18 +92,35 @@ lconsi(int datum, List *list)
return
l
;
}
/*
* lappend
*
* Add obj to the end of list, or make a new list if 'list' is NIL
*
* MORE EXPENSIVE THAN lcons
*/
List
*
lappend
(
List
*
list
,
void
*
obj
)
{
return
nconc
(
list
,
lcons
(
obj
,
NIL
));
}
/*
* lappendi
*
* Same as lappend, but for integers
*/
List
*
lappendi
(
List
*
list
,
int
datum
)
{
return
nconc
(
list
,
lconsi
(
datum
,
NIL
));
}
/*
* nconc
*
* Concat l2 on to the end of l1
*/
List
*
nconc
(
List
*
l1
,
List
*
l2
)
{
...
...
@@ -131,6 +163,9 @@ nreverse(List *list)
}
#endif
/*
* makeInteger
*/
Value
*
makeInteger
(
long
i
)
{
...
...
@@ -141,6 +176,9 @@ makeInteger(long i)
return
v
;
}
/*
* makeFloat
*/
Value
*
makeFloat
(
double
d
)
{
...
...
@@ -151,6 +189,9 @@ makeFloat(double d)
return
v
;
}
/*
* makeString
*/
Value
*
makeString
(
char
*
str
)
{
...
...
@@ -161,7 +202,11 @@ makeString(char *str)
return
v
;
}
/* n starts with 0 */
/*
* nth
*
* Get the n'th element of the list. First element is 0th.
*/
void
*
nth
(
int
n
,
List
*
l
)
{
...
...
@@ -174,6 +219,11 @@ nth(int n, List *l)
return
lfirst
(
l
);
}
/*
* nthi
*
* Same as nthi, but for integers
*/
int
nthi
(
int
n
,
List
*
l
)
{
...
...
@@ -200,6 +250,11 @@ set_nth(List *l, int n, void *elem)
return
;
}
/*
* length
*
* Get the length of l
*/
int
length
(
List
*
l
)
{
...
...
@@ -213,6 +268,11 @@ length(List *l)
return
i
;
}
/*
* freeList
*
* Free the List nodes of a list
*/
void
freeList
(
List
*
list
)
{
...
...
@@ -415,6 +475,9 @@ lremove(void *elem, List *list)
return
result
;
}
/*
* LispRemove
*/
List
*
LispRemove
(
void
*
elem
,
List
*
list
)
{
...
...
@@ -466,6 +529,11 @@ intLispRemove(int elem, List *list)
#endif
/*
* set_difference
*
* Return l1 without the elements in l2.
*/
List
*
set_difference
(
List
*
l1
,
List
*
l2
)
{
...
...
@@ -483,6 +551,11 @@ set_difference(List *l1, List *l2)
return
result
;
}
/*
* set_differencei
*
* Same as set_difference, but for integers
*/
List
*
set_differencei
(
List
*
l1
,
List
*
l2
)
{
...
...
src/backend/optimizer/path/joinrels.c
View file @
ceb233ed
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/joinrels.c,v 1.3
1 1999/02/22 05:26:20
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/joinrels.c,v 1.3
2 1999/02/22 06:08:48
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -61,7 +61,7 @@ make_rels_by_joins(Query *root, List *old_rels)
*/
joined_rels
=
make_rels_by_clauseless_joins
(
old_rel
,
root
->
base_rel_list
);
joined_rels
=
append
(
joined_rels
,
joined_rels
=
nconc
(
joined_rels
,
make_rels_by_clauseless_joins
(
old_rel
,
old_rels
));
}
...
...
@@ -236,10 +236,10 @@ make_join_rel(RelOptInfo *outer_rel, RelOptInfo *inner_rel, JoinInfo *joininfo)
joinrel
->
restrictinfo
=
joininfo
->
jinfo_restrictinfo
;
joinrel_joininfo_list
=
new_joininfo_list
(
append
(
outer_rel
->
joininfo
,
inner_rel
->
joininfo
),
nconc
(
copyObject
(
outer_rel
->
joininfo
)
,
copyObject
(
inner_rel
->
joininfo
)
),
nconc
(
listCopy
(
outer_rel
->
relids
),
listCopy
(
inner_rel
->
relids
)));
listCopy
(
inner_rel
->
relids
)));
joinrel
->
joininfo
=
joinrel_joininfo_list
;
...
...
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