]> git.joonet.de Git - adminer.git/commitdiff
PostgreSQL: Fix multi-parameter functions in default values (bug #736)
authorJakub Vrana <jakub@vrana.cz>
Mon, 8 Feb 2021 15:23:36 +0000 (16:23 +0100)
committerJakub Vrana <jakub@vrana.cz>
Mon, 8 Feb 2021 15:23:36 +0000 (16:23 +0100)
adminer/drivers/pgsql.inc.php
changes.txt

index 4895df0cbeaad05edf33349186a9c1eee641c479..d6213b4d5e611b0e00d6d396e4e7f57d433a7b03 100644 (file)
@@ -380,7 +380,7 @@ ORDER BY a.attnum"
                        $row["null"] = !$row["attnotnull"];
                        $row["auto_increment"] = $row['identity'] || preg_match('~^nextval\(~i', $row["default"]);
                        $row["privileges"] = array("insert" => 1, "select" => 1, "update" => 1);
-                       if (preg_match('~(.+)::[^)]+(.*)~', $row["default"], $match)) {
+                       if (preg_match('~(.+)::[^,)]+(.*)~', $row["default"], $match)) {
                                $row["default"] = ($match[1] == "NULL" ? null : (($match[1][0] == "'" ? idf_unescape($match[1]) : $match[1]) . $match[2]));
                        }
                        $return[$row["field"]] = $row;
index 186f852c636a07380ee2408a2b56baede186ed5d..188969bbb2540bb202e4f1017fed994fdf03cf93 100644 (file)
@@ -5,6 +5,7 @@ Support PHP 8 in create table (regression from 4.7.9)
 MySQL 8: Fix EXPLAIN in SQL command
 PostgreSQL: Create PRIMARY KEY for auto increment columns
 PostgreSQL: Avoid exporting empty sequence last value (bug #768)
+PostgreSQL: Fix multi-parameter functions in default values (bug #736)
 PostgreSQL PDO: Do not select NULL function for false values in edit
 
 Adminer 4.7.9 (released 2021-02-07):