summaryrefslogtreecommitdiff
path: root/contrib/dblink
diff options
context:
space:
mode:
authorTom Lane2003-06-15 17:59:10 +0000
committerTom Lane2003-06-15 17:59:10 +0000
commit3fb6f1347ffbfcbba48b37ea35925f6b19821bf6 (patch)
tree5a79f771fb6560fdf0896d5b05342dce8885bf70 /contrib/dblink
parent996fdb9af1e298ae1ce3729429d2416e41344086 (diff)
Replace cryptic 'Unknown kind of return type' messages with something
hopefully a little more useful.
Diffstat (limited to 'contrib/dblink')
-rw-r--r--contrib/dblink/dblink.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/contrib/dblink/dblink.c b/contrib/dblink/dblink.c
index 20e7662e28..a8e9c5ab50 100644
--- a/contrib/dblink/dblink.c
+++ b/contrib/dblink/dblink.c
@@ -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 */