]> git.joonet.de Git - adminer.git/commitdiff
CockroachDB: Recognize unique_rowid() as auto_increment
authorJakub Vrana <jakub@vrana.cz>
Thu, 13 Mar 2025 12:09:05 +0000 (13:09 +0100)
committerJakub Vrana <jakub@vrana.cz>
Thu, 13 Mar 2025 12:09:05 +0000 (13:09 +0100)
adminer/drivers/pgsql.inc.php
changes.txt

index f3bc4c08fdc4d1ec8254923092345f351be493f7..84c474f5d9015c487c5fe77ebf4b6cac5d03f1ca 100644 (file)
@@ -464,7 +464,8 @@ ORDER BY a.attnum") as $row
                        }
                        $row["generated"] = ($row["attgenerated"] == "s" ? "STORED" : "");
                        $row["null"] = !$row["attnotnull"];
-                       $row["auto_increment"] = $row['attidentity'] || preg_match('~^nextval\(~i', $row["default"]);
+                       $row["auto_increment"] = $row['attidentity'] || preg_match('~^nextval\(~i', $row["default"])
+                               || preg_match('~^unique_rowid\(~', $row["default"]); // CockroachDB
                        $row["privileges"] = array("insert" => 1, "select" => 1, "update" => 1, "where" => 1, "order" => 1);
                        if (preg_match('~(.+)::[^,)]+(.*)~', $row["default"], $match)) {
                                $row["default"] = ($match[1] == "NULL" ? null : idf_unescape($match[1]) . $match[2]);
index 0f54dd5f62fe913f94cb4d0c436683f2b59448c5..54323857aeb420c0806956acc025608803080a39 100644 (file)
@@ -5,6 +5,7 @@ MySQL: Allow setting default values of json column
 MariaDB: Don't display NULL as default value (regression from 5.0.0)
 PostgreSQL PDO: Escape bytea values (bug #218)
 CockroachDB: Display version
+CockroachDB: Recognize unique_rowid() as auto_increment
 MS SQL: Fix editing rows with datetime column in primary key
 CSS: Add dark theme