diff --git a/CHANGELOG.md b/CHANGELOG.md index 0cf849a2..0236296f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ - PostgreSQL: Shorten values in hstore columns - PostgreSQL: Quote edit value with interval operator - PostgreSQL: Fix calling functions with name-less parameters +- PostgreSQL: Fix calling functions returing table - PostgreSQL 11-: Avoid duplicate oid in table status (bug #1089) - Elasticsearch: Support dropping aliases - Plugins: Methods afterConnect(), processList() and killProcess() diff --git a/adminer/call.inc.php b/adminer/call.inc.php index e6279c27..4658e661 100644 --- a/adminer/call.inc.php +++ b/adminer/call.inc.php @@ -36,7 +36,7 @@ if (!$error && $_POST) { } } - $query = (isset($_GET["callf"]) ? "SELECT" : "CALL") . " " . table($PROCEDURE) . "(" . implode(", ", $call) . ")"; + $query = (isset($_GET["callf"]) ? "SELECT " : "CALL ") . ($routine["returns"]["type"] == "record" ? "* FROM " : "") . table($PROCEDURE) . "(" . implode(", ", $call) . ")"; $start = microtime(true); $result = connection()->multi_query($query); $affected = connection()->affected_rows; // getting warnings overwrites this