mirror of
https://github.com/vrana/adminer.git
synced 2025-08-12 17:44:07 +02:00
Fix NULL value in edit form with Postgres
This commit is contained in:
committed by
Jakub Vrana
parent
6a95b71164
commit
019ada8da5
@@ -304,7 +304,7 @@ ORDER BY a.attnum"
|
||||
$row["auto_increment"] = preg_match('~^nextval\\(~i', $row["default"]);
|
||||
$row["privileges"] = array("insert" => 1, "select" => 1, "update" => 1);
|
||||
if (preg_match('~(.+)::[^)]+(.*)~', $row["default"], $match)) {
|
||||
$row["default"] = ($match[1][0] == "'" ? idf_unescape($match[1]) : $match[1]) . $match[2];
|
||||
$row["default"] = ($match[1] == "NULL" ? null : (($match[1][0] == "'" ? idf_unescape($match[1]) : $match[1]) . $match[2]));
|
||||
}
|
||||
$return[$row["field"]] = $row;
|
||||
}
|
||||
|
Reference in New Issue
Block a user