]> git.joonet.de Git - adminer.git/commitdiff
PostgreSQL: Align numbers in SQL command right (fix #1071)
authorJakub Vrana <jakub@vrana.cz>
Sun, 4 May 2025 10:05:59 +0000 (12:05 +0200)
committerJakub Vrana <jakub@vrana.cz>
Sun, 4 May 2025 11:03:47 +0000 (13:03 +0200)
adminer/drivers/pgsql.inc.php

index da6dfe2a587459edb0480aec3513af2b51761eaf..d6aae369c9bb89bf43a8f7a6f34e77806ea0cac4 100644 (file)
@@ -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;
                        }