1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-05 06:07:57 +02:00

PgSQL <10: Don't try partitions

This commit is contained in:
Jakub Vrana
2025-08-04 07:44:46 +02:00
parent 18b62aba38
commit 0de6a057d3

View File

@@ -340,7 +340,7 @@ if (isset($_GET["pgsql"])) {
}
function partitionsInfo(string $table): array {
$row = connection()->query("SELECT * FROM pg_partitioned_table WHERE partrelid = " . $this->tableOid($table))->fetch_assoc();
$row = (min_version(10) ? connection()->query("SELECT * FROM pg_partitioned_table WHERE partrelid = " . $this->tableOid($table))->fetch_assoc() : null);
if ($row) {
$attrs = get_vals("SELECT attname FROM pg_attribute WHERE attrelid = $row[partrelid] AND attnum IN (" . str_replace(" ", ", ", $row["partattrs"]) . ")"); //! ordering
$by = array('h' => 'HASH', 'l' => 'LIST', 'r' => 'RANGE');