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
76d09f46
Commit
76d09f46
authored
Oct 19, 2002
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix case where a function in FROM returns a scalar type, but is
referred to with whole-tuple syntax.
parent
0d93e385
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
8 deletions
+25
-8
src/backend/parser/parse_func.c
src/backend/parser/parse_func.c
+25
-8
No files found.
src/backend/parser/parse_func.c
View file @
76d09f46
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/parse_func.c,v 1.13
7 2002/09/18 21:35:22
tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/parse_func.c,v 1.13
8 2002/10/19 21:23:20
tgl Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -191,9 +191,33 @@ ParseFuncOrColumn(ParseState *pstate, List *funcname, List *fargs,
if
(
!
OidIsValid
(
toid
))
elog
(
ERROR
,
"Cannot find type OID for relation %u"
,
rte
->
relid
);
/* replace RangeVar in the arg list */
lfirst
(
i
)
=
makeVar
(
vnum
,
InvalidAttrNumber
,
toid
,
sizeof
(
Pointer
),
sublevels_up
);
break
;
case
RTE_FUNCTION
:
toid
=
exprType
(
rte
->
funcexpr
);
if
(
get_typtype
(
toid
)
==
'c'
)
{
/* func returns composite; same as relation case */
lfirst
(
i
)
=
makeVar
(
vnum
,
InvalidAttrNumber
,
toid
,
sizeof
(
Pointer
),
sublevels_up
);
}
else
{
/* func returns scalar; use attno 1 instead */
lfirst
(
i
)
=
makeVar
(
vnum
,
1
,
toid
,
-
1
,
sublevels_up
);
}
break
;
default:
...
...
@@ -210,13 +234,6 @@ ParseFuncOrColumn(ParseState *pstate, List *funcname, List *fargs,
toid
=
InvalidOid
;
/* keep compiler quiet */
break
;
}
/* replace RangeVar in the arg list */
lfirst
(
i
)
=
makeVar
(
vnum
,
InvalidAttrNumber
,
toid
,
sizeof
(
Pointer
),
sublevels_up
);
}
else
toid
=
exprType
(
arg
);
...
...
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