PostgreSQL: Fix multi-parameter functions in default values (bug #736)

This commit is contained in:
Jakub Vrana 2021-02-08 16:23:36 +01:00
parent 92f197b7c1
commit e915f73f18
2 changed files with 2 additions and 1 deletions

View 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;

View 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):