v.20.12Improvement
Informative error message for ATTACH/DETACH TABLE in ClickHouse
Throw an informative error message when doingATTACH/DETACH TABLE <DICTIONARY>. Before this PR,detach table <dict>works but leads to an ill-formed in-memory metadata. #16885 (Amos Bird).
Why it matters
Prevent ill-formed in-memory metadata by disallowing ATTACH/DETACH operations on dictionary objects, improving error clarity and system stability.How to use it
When attempting to attach or detach dictionary objects usingATTACH TABLE <dictionary> or DETACH TABLE <dictionary>, ClickHouse will now return a clear and informative error message instead of allowing the operation. Users should avoid these commands for dictionaries to prevent metadata corruption.