Subject Re: [ib-support] primary key not enforced after recreating the table
Author Paul Reeves
David Garamond wrote:
> yes, that _is_ my problem. why doesn't it fail after the table is
> dropped and recreated??? i am deliberately inserting the value "1" so
> the second insert would be rejected by the unique index. but after
> DROP+CREATE, i can insert duplicate rows.

You might try committing after the drop and the create. Neither action
will be complete until you do. What you have discovered is that the
engine does some things immediately and defers others until commit.

Is this a bug or is it 'as-designed' (or both)? I don't know without
investigating things further. However, the usual practice with DDL
statements is to commit after each one is executed.


Paul
--

Paul Reeves
http://www.ibphoenix.com
Supporting users of Firebird and InterBase