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
7702d7aa
Commit
7702d7aa
authored
Jul 20, 1998
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
target list fixes.
parent
1d00134b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
29 deletions
+7
-29
src/backend/optimizer/plan/planner.c
src/backend/optimizer/plan/planner.c
+4
-4
src/backend/optimizer/util/tlist.c
src/backend/optimizer/util/tlist.c
+1
-21
src/include/optimizer/tlist.h
src/include/optimizer/tlist.h
+2
-4
No files found.
src/backend/optimizer/plan/planner.c
View file @
7702d7aa
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planner.c,v 1.2
8 1998/07/19 05:49:14
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planner.c,v 1.2
9 1998/07/20 21:18:32
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -446,7 +446,7 @@ pg_checkretval(Oid rettype, QueryTreeList *queryTreeList)
if
(
typeTypeRelid
(
typ
)
==
InvalidOid
)
{
if
(
exec_tlist_l
ength
(
tlist
)
>
1
)
if
(
ExecTargetListL
ength
(
tlist
)
>
1
)
elog
(
ERROR
,
"function declared to return %s returns multiple values in final retrieve"
,
typeTypeName
(
typ
));
resnode
=
(
Resdom
*
)
((
TargetEntry
*
)
lfirst
(
tlist
))
->
resdom
;
...
...
@@ -464,7 +464,7 @@ pg_checkretval(Oid rettype, QueryTreeList *queryTreeList)
* is 'retrieve (x = func2())', where func2 has the same return type
* as the function that's calling it.
*/
if
(
exec_tlist_l
ength
(
tlist
)
==
1
)
if
(
ExecTargetListL
ength
(
tlist
)
==
1
)
{
resnode
=
(
Resdom
*
)
((
TargetEntry
*
)
lfirst
(
tlist
))
->
resdom
;
if
(
resnode
->
restype
==
rettype
)
...
...
@@ -485,7 +485,7 @@ pg_checkretval(Oid rettype, QueryTreeList *queryTreeList)
relid
=
reln
->
rd_id
;
relnatts
=
reln
->
rd_rel
->
relnatts
;
if
(
exec_tlist_l
ength
(
tlist
)
!=
relnatts
)
if
(
ExecTargetListL
ength
(
tlist
)
!=
relnatts
)
elog
(
ERROR
,
"function declared to return type %s does not retrieve (%s.*)"
,
typeTypeName
(
typ
),
typeTypeName
(
typ
));
/* expect attributes 1 .. n in order */
...
...
src/backend/optimizer/util/tlist.c
View file @
7702d7aa
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/tlist.c,v 1.1
5 1998/07/20 19:53:48
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/tlist.c,v 1.1
6 1998/07/20 21:18:34
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -589,23 +589,3 @@ AddGroupAttrToTlist(List *tlist, List *grpCl)
}
#endif
/* was ExecTargetListLength() in execQual.c,
moved here to reduce dependencies on the executor module */
int
exec_tlist_length
(
List
*
targetlist
)
{
int
len
;
List
*
tl
;
TargetEntry
*
curTle
;
len
=
0
;
foreach
(
tl
,
targetlist
)
{
curTle
=
lfirst
(
tl
);
if
(
curTle
->
resdom
!=
NULL
)
len
++
;
}
return
len
;
}
src/include/optimizer/tlist.h
View file @
7702d7aa
...
...
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: tlist.h,v 1.1
1 1998/07/20 20:48:54
momjian Exp $
* $Id: tlist.h,v 1.1
2 1998/07/20 21:18:35
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -17,7 +17,6 @@
#include "nodes/parsenodes.h"
#include "nodes/relation.h"
extern
int
exec_tlist_length
(
List
*
targelist
);
extern
TargetEntry
*
tlistentry_member
(
Var
*
var
,
List
*
targetlist
);
extern
Expr
*
matching_tlvar
(
Var
*
var
,
List
*
targetlist
);
extern
void
add_tl_element
(
RelOptInfo
*
rel
,
Var
*
var
);
...
...
@@ -30,8 +29,7 @@ extern TargetEntry *match_varid(Var *test_var, List *tlist);
extern
List
*
new_unsorted_tlist
(
List
*
targetlist
);
extern
List
*
copy_vars
(
List
*
target
,
List
*
source
);
extern
List
*
flatten_tlist
(
List
*
tlist
);
extern
List
*
flatten_tlist_vars
(
List
*
full_tlist
,
extern
List
*
flatten_tlist_vars
(
List
*
full_tlist
,
List
*
flat_tlist
);
#endif
/* TLIST_H */
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