I am testing Firebird-6.0.0.1941-eec431b-linux-x64.
Create Table T1(
F1 Integer Generated By Default As Identity Primary Key,
F2 VarChar(1));
Insert Into T1(F2) Values ( 'A');
Insert Into T1 Values (2, 'B');
Insert Into T1(F2) Values ( 'C'); <-- expected error
Commit;
Alter Table T1 Alter Column F1 Restart With 2; <-- bug?
Commit;
isql:
SQL> Create Table T1(
CON> F1 Integer Generated By Default As Identity Primary Key,
CON> F2 VarChar(1));
SQL> Insert Into T1(F2) Values ( 'A');
SQL> Insert Into T1 Values (2, 'B');
SQL> Insert Into T1(F2) Values ( 'C');
Statement failed, SQLSTATE = 23000
violation of PRIMARY or UNIQUE KEY constraint "INTEG_848" on table "PUBLIC"."T1"
-Problematic key value is ("F1" = 2)
SQL>
SQL> Alter Table T1 Alter Column F1 Restart With 2;
Statement failed, SQLSTATE = 42000
unsuccessful metadata update
-ALTER TABLE "PUBLIC"."T1" failed
-Cannot delete index used by an Integrity Constraint
SQL> Commit;
SQL>
SQL> Alter Table T1 Alter Column F1 Restart With 3;
Statement failed, SQLSTATE = 42000
unsuccessful metadata update
-ALTER TABLE "PUBLIC"."T1" failed
-Cannot delete index used by an Integrity Constraint
SQL>