PostgreSQL: Fix calling functions returing table

This commit is contained in:
Jakub Vrana
2025-08-15 23:43:25 +02:00
parent b83da41739
commit 4ad7eb0b70
2 changed files with 2 additions and 1 deletions

View File

@@ -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()

View File

@@ -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