Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alter domain depedence problem when changing VAR(CHAR) size [CORE1427] #1845

Open
firebird-automations opened this issue Aug 27, 2007 · 6 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: @WarmBooter

Votes: 3

If you try to change the size of a VARCHAR domain being used in [composite] Primary Keys, Firebird complains like:

This operation is not defined for system tables.
unsuccessful metadata update.
MODIFY RDB$FIELDS failed.
action cancelled by trigger (1) to preserve data integrity.
Cannot update index segment used by an Integrity Constraint.

Vlad told me that indexes doesn't mind about var(char) field size, so this rule could be "relaxed".

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

Workflow: jira [ 12891 ] => Firebird [ 15350 ]

@firebird-automations
Copy link
Collaborator Author

Commented by: Ain Valtin (ain)

As far as I can see, the domain doesn't have to be used by PK - I do get similar error when trying to alert one which isn't used by any PK / FK (using 2.0.3).

@firebird-automations
Copy link
Collaborator Author

Commented by: Smirnoff Serg (wildsery)

Dependence problem exists for any field domains that is used by (for ex. by proc).
The error is:
"This operation is not defined for system tables.
unsuccessful metadata update.
Column ... from table ... is referenced in ..."

Thinks that if altering domain is proper action, than no need to lookup some additional boundaries like field usage.
If user do this, than he know what to do, and the shooting leg will be on his conscience.

Whether or no, now user skip the proper ALTER command and use the "update rdb$fields" that is quite dangerous but meet no dependencies problems.

@firebird-automations
Copy link
Collaborator Author

Commented by: @dyemanov

Serg, I think you mention a different (although related) issue here. Index is not a regular (usually PSQL) dependency and is likely to imply a separate set of rules.

@firebird-automations
Copy link
Collaborator Author

Commented by: Smirnoff Serg (wildsery)

So what to do? Create separate ticket?

@firebird-automations
Copy link
Collaborator Author

Commented by: Alvaro Castiello (acastiello)

This issue is a most. The whole pourpose of using domains is not have to recreate the database when you need to change one of such domains

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment