]> git.joonet.de Git - adminer.git/commitdiff
PostgreSQL 11: Create PRIMARY KEY for auto increment columns
authorJakub Vrana <jakub@vrana.cz>
Sat, 6 Feb 2021 17:01:24 +0000 (18:01 +0100)
committerJakub Vrana <jakub@vrana.cz>
Sat, 6 Feb 2021 17:01:24 +0000 (18:01 +0100)
adminer/drivers/pgsql.inc.php
changes.txt

index 98e5974f039aeaff457ec354bbc58114da997a2b..f3c880b230bb86dfb444ec8bc645e54a140ab149 100644 (file)
@@ -491,7 +491,7 @@ ORDER BY connamespace, conname") as $row) {
        }
 
        function auto_increment() {
-               return "";
+               return (min_version(11) ? " PRIMARY KEY" : "");
        }
 
        function alter_table($table, $name, $fields, $foreign, $comment, $engine, $collation, $auto_increment, $partitioning) {
index a731bc3c67523b5d3e5c804dbb7c7306fbbb9384..62a296adb671fb06cba34ccdd6fc6b88856e1579 100644 (file)
@@ -8,6 +8,7 @@ PostgreSQL: Do not show view definition from other schema (PR #392)
 PostgreSQL: Use bigserial for bigint auto increment (bug #765, regression from 3.0.0)
 PostgreSQL PDO: Support PgBouncer, unsupport PostgreSQL < 9.1 (bug #771)
 PostgreSQL 10: Support GENERATED ALWAYS BY IDENTITY (PR #386)
+PostgreSQL 11: Create PRIMARY KEY for auto increment columns
 MS SQL: Don't truncate comments to 30 chars (PR #376)
 Editor: Cast to string when searching (bug #325)
 Re-enable PHP warnings (regression from 4.7.8)