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
3fb6f134
Commit
3fb6f134
authored
Jun 15, 2003
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace cryptic 'Unknown kind of return type' messages with something
hopefully a little more useful.
parent
996fdb9a
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
20 additions
and
19 deletions
+20
-19
contrib/dblink/dblink.c
contrib/dblink/dblink.c
+2
-6
contrib/tablefunc/tablefunc.c
contrib/tablefunc/tablefunc.c
+1
-3
src/backend/access/common/tupdesc.c
src/backend/access/common/tupdesc.c
+5
-2
src/backend/catalog/pg_proc.c
src/backend/catalog/pg_proc.c
+3
-2
src/backend/executor/nodeFunctionscan.c
src/backend/executor/nodeFunctionscan.c
+5
-2
src/backend/parser/parse_relation.c
src/backend/parser/parse_relation.c
+4
-4
No files found.
contrib/dblink/dblink.c
View file @
3fb6f134
...
...
@@ -327,10 +327,8 @@ dblink_fetch(PG_FUNCTION_ARGS)
tupdesc
=
TypeGetTupleDesc
(
functypeid
,
NIL
);
else
if
(
functyptype
==
'p'
&&
functypeid
==
RECORDOID
)
tupdesc
=
pgresultGetTupleDesc
(
res
);
else
if
(
functyptype
==
'b'
)
elog
(
ERROR
,
"dblink_fetch: invalid kind of return type specified for function"
);
else
elog
(
ERROR
,
"dblink_fetch:
unknown kind of return type specified for function
"
);
elog
(
ERROR
,
"dblink_fetch:
return type must be a row type
"
);
/* store needed metadata for subsequent calls */
slot
=
TupleDescGetSlot
(
tupdesc
);
...
...
@@ -506,10 +504,8 @@ dblink_record(PG_FUNCTION_ARGS)
tupdesc
=
TypeGetTupleDesc
(
functypeid
,
NIL
);
else
if
(
functyptype
==
'p'
&&
functypeid
==
RECORDOID
)
tupdesc
=
pgresultGetTupleDesc
(
res
);
else
if
(
functyptype
==
'b'
)
elog
(
ERROR
,
"Invalid kind of return type specified for function"
);
else
elog
(
ERROR
,
"
Unknown kind of return type specified for function
"
);
elog
(
ERROR
,
"
dblink: return type must be a row type
"
);
}
/* store needed metadata for subsequent calls */
...
...
contrib/tablefunc/tablefunc.c
View file @
3fb6f134
...
...
@@ -445,10 +445,8 @@ crosstab(PG_FUNCTION_ARGS)
tupdesc
=
make_crosstab_tupledesc
(
spi_tupdesc
,
num_categories
);
}
}
else
if
(
functyptype
==
'b'
)
elog
(
ERROR
,
"Invalid kind of return type specified for function"
);
else
elog
(
ERROR
,
"
Unknown kind of return type specified for function
"
);
elog
(
ERROR
,
"
crosstab: return type must be a row type
"
);
/*
* Check that return tupdesc is compatible with the one we got
...
...
src/backend/access/common/tupdesc.c
View file @
3fb6f134
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/common/tupdesc.c,v 1.9
4 2002/11/13 00:39:46 momjian
Exp $
* $Header: /cvsroot/pgsql/src/backend/access/common/tupdesc.c,v 1.9
5 2003/06/15 17:59:10 tgl
Exp $
*
* NOTES
* some of the executor utility code such as "ExecTypeFromTL" should be
...
...
@@ -697,7 +697,10 @@ TypeGetTupleDesc(Oid typeoid, List *colaliases)
else
if
(
functyptype
==
'p'
&&
typeoid
==
RECORDOID
)
elog
(
ERROR
,
"Unable to determine tuple description for function returning
\"
record
\"
"
);
else
elog
(
ERROR
,
"Unknown kind of return type specified for function"
);
{
/* crummy error message, but parser should have caught this */
elog
(
ERROR
,
"function in FROM has unsupported return type"
);
}
return
tupdesc
;
}
src/backend/catalog/pg_proc.c
View file @
3fb6f134
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/catalog/pg_proc.c,v 1.9
6 2003/04/08 23:20:0
0 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/catalog/pg_proc.c,v 1.9
7 2003/06/15 17:59:1
0 tgl Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -483,7 +483,8 @@ checkretval(Oid rettype, char fn_typtype, List *queryTreeList)
*/
}
else
elog
(
ERROR
,
"Unknown kind of return type specified for function"
);
elog
(
ERROR
,
"return type %s is not supported for SQL functions"
,
format_type_be
(
rettype
));
}
...
...
src/backend/executor/nodeFunctionscan.c
View file @
3fb6f134
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/nodeFunctionscan.c,v 1.1
7 2003/01/12 22:01:38
tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/executor/nodeFunctionscan.c,v 1.1
8 2003/06/15 17:59:10
tgl Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -231,7 +231,10 @@ ExecInitFunctionScan(FunctionScan *node, EState *estate)
tupdesc
=
BuildDescForRelation
(
rte
->
coldeflist
);
}
else
elog
(
ERROR
,
"Unknown kind of return type specified for function"
);
{
/* crummy error message, but parser should have caught this */
elog
(
ERROR
,
"function in FROM has unsupported return type"
);
}
scanstate
->
tupdesc
=
tupdesc
;
ExecSetSlotDescriptor
(
scanstate
->
ss
.
ss_ScanTupleSlot
,
...
...
src/backend/parser/parse_relation.c
View file @
3fb6f134
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/parse_relation.c,v 1.8
2 2003/06/11 22:13:22 momjian
Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/parse_relation.c,v 1.8
3 2003/06/15 17:59:10 tgl
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -992,7 +992,7 @@ addRangeTableEntryForFunction(ParseState *pstate,
}
}
else
elog
(
ERROR
,
"
Unknown kind of return type specified for function %s
"
,
elog
(
ERROR
,
"
function %s() in FROM has unsupported return type
"
,
funcname
);
/*----------
...
...
@@ -1382,7 +1382,7 @@ expandRTE(ParseState *pstate, RangeTblEntry *rte,
}
}
else
elog
(
ERROR
,
"
Unknown kind of return type specified for function
"
);
elog
(
ERROR
,
"
function in FROM has unsupported return type
"
);
}
break
;
case
RTE_JOIN
:
...
...
@@ -1636,7 +1636,7 @@ get_rte_attribute_type(RangeTblEntry *rte, AttrNumber attnum,
*
vartypmod
=
-
1
;
}
else
elog
(
ERROR
,
"
Unknown kind of return type specified for function
"
);
elog
(
ERROR
,
"
function in FROM has unsupported return type
"
);
}
break
;
case
RTE_JOIN
:
...
...
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