From 9b0acfa7c993f814b2068176cb9088b50216b8f9 Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Sun, 4 May 2025 12:05:59 +0200 Subject: [PATCH] PostgreSQL: Align numbers in SQL command right (fix #1071) --- adminer/drivers/pgsql.inc.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/adminer/drivers/pgsql.inc.php b/adminer/drivers/pgsql.inc.php index da6dfe2a..d6aae369 100644 --- a/adminer/drivers/pgsql.inc.php +++ b/adminer/drivers/pgsql.inc.php @@ -127,8 +127,9 @@ if (isset($_GET["pgsql"])) { $return = new \stdClass; $return->orgtable = pg_field_table($this->result, $column); $return->name = pg_field_name($this->result, $column); - $return->type = pg_field_type($this->result, $column); //! map to MySQL numbers - $return->charsetnr = ($return->type == "bytea" ? 63 : 0); // 63 - binary + $type = pg_field_type($this->result, $column); + $return->type = (preg_match(number_type(), $type) ? 0 : 15); + $return->charsetnr = ($type == "bytea" ? 63 : 0); // 63 - binary return $return; }