This page describes some Xpand-specific behavior of foreign keys
Supported with Foreign Keys
Xpand supports foreign keys and maintains referential integrity by default.
Unsupported with Foreign Keys
- Xpand does not support the referential action SET DEFAULT.
Caveats with Foreign Keys
- Xpand does not allow foreign keys with non-unique parents with referential actions CASCADE or SET NULL. When a schema with a foreign key referencing a non-unique parent is created or altered and uses CASCADE or SET NULL, Xpand will provide an error message.
- Xpand does not validate that foreign keys reference columns with the same data type.
- If dangling foreign key references are created when foreign_key_checks is disabled, subsequent inserts will succeed even if foreign_key_checks is enabled.
- Xpand allows self-referencing foreign keys.
- Xpand does not require a key length to be specified when a foreign key references a BLOB or TEXT column.
- When adding or dropping a foreign key, the reported number of rows affected does not reflect the actual number of rows.