Skip to content

Commit 5789b2a

Browse files
authored
Merge pull request #1316 from sqlancer/fix/postgres-alter-table-pk-not-null
PostgreSQL: Add expected error for PRIMARY KEY on column with DROP NO…
2 parents 7fcd1ce + 3db5ffa commit 5789b2a

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/sqlancer/postgres/gen/PostgresAlterTableGenerator.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,7 @@ public SQLQueryAdapter generate() {
304304
errors.add("multiple primary keys for table");
305305
errors.add("could not create unique index");
306306
errors.add("contains null values");
307+
errors.add("is not marked NOT NULL");
307308
errors.add("cannot cast type");
308309
errors.add("unsupported PRIMARY KEY constraint with partition key definition");
309310
errors.add("unsupported UNIQUE constraint with partition key definition");
@@ -342,6 +343,7 @@ public SQLQueryAdapter generate() {
342343
errors.add("appears twice in unique constraint");
343344
errors.add("appears twice in primary key constraint");
344345
errors.add("contains null values");
346+
errors.add("is not marked NOT NULL");
345347
errors.add("insufficient columns in PRIMARY KEY constraint definition");
346348
errors.add("which is part of the partition key");
347349
break;

0 commit comments

Comments
 (0)