Subject Re: [firebird-support] Drop a field with PK with FB 2.1
Author Thomas Steinmaurer
> Yesterday I found it by accident, that with FB 2.1 it is possible to
> drop a field, that is a part of a PK constraint. With FB 2.0.3 I get an
> error
>
> ALTER TABLE CUSTOMERGROUPS DROP CUID
> Error:
> ISC ERROR CODE:335544351
>
> ISC ERROR MESSAGE:
> unsuccessful metadata update
> column CUID from table CUSTOMERGROUPS is referenced in index
> PK_CUSTOMERGROUPS
>
> Is this by design, that this is possible with FB 2.1?

It's not possible with FB 2.1 RC2. When I'm trying to drop a field which
is part of a composite PK constraint, I get the following error message:

unsuccessful metadata update ERASE RDB$RELATION_FIELDS failed action
cancelled by trigger (1) to preserve data integrity Cannot delete column
being used in an Integrity Constraint.

Btw, as FB 2.1 is not yet released, move any further 2.1 related
questions to firebird-devel. ;-)


--
Best Regards,
Thomas Steinmaurer
LogManager Series - Logging/Auditing Suites supporting
InterBase, Firebird, Advantage Database, MS SQL Server and
NexusDB V2
Upscene Productions
http://www.upscene.com