Permalink
Browse files

Fix altering of default values in PostgreSQL

  • Loading branch information...
juzna authored and vrana committed May 18, 2011
1 parent 06aa0f8 commit cde1d43e8954af731feb63e0a536757f886b0686
Showing with 4 additions and 0 deletions.
  1. +3 −0 adminer/drivers/pgsql.inc.php
  2. +1 −0 changes.txt
@@ -241,6 +241,9 @@ function fields($table) {
$row["null"] = ($row["attnotnull"] == "f");
$row["auto_increment"] = eregi("^nextval\\(", $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]);
+ }
$return[$row["field"]] = $row;
}
return $return;
View
@@ -1,4 +1,5 @@
Adminer 3.3.1-dev:
+Fix altering default values (PostgreSQL)
Process list (PostgreSQL)
Adminer 3.3.0 (released 2011-07-19):

0 comments on commit cde1d43

Please sign in to comment.