Github user orhankislal commented on a diff in the pull request:
https://github.com/apache/madlib/pull/266#discussion_r183180223
--- Diff: src/madpack/upgrade_util.py ---
@@ -82,16 +82,21 @@ def _get_function_info(self, oid):
proname,
textin(regtypeout(prorettype::regtype)) AS rettype,
CASE array_upper(proargtypes,1) WHEN -1 THEN ''
- ELSE
textin(regtypeout(unnest(proargtypes)::regtype))
+ ELSE textin(regtypeout(foo))
END AS argtype,
CASE WHEN proargnames IS NULL THEN ''
- ELSE unnest(proargnames)
+ ELSE bar
END AS argname,
CASE array_upper(proargtypes,1) WHEN -1 THEN 1
- ELSE generate_series(0, array_upper(proargtypes,
1))
+ ELSE zee
END AS i
FROM
- pg_proc AS p
+ (SELECT *, oid,
+ unnest(proargtypes)::regtype AS foo,
--- End diff --
We changed the query because PG 10 does not allow set returning functions
in the `CASE` clause any more.
---