On Fri, 2 Oct 2026 at 09:30, Laurenz Albe <[email protected]> wrote: > > You could simply require the constraint to be > > ROW(col)::record *= ROW(expression)::record > > That would also behave as desired for NULL values. > > True, it looks hacky, but as you said, it is a constraint created > for this special purpose.
I don't think that's a good solution: Whilst it may work, it also adds significant and potentially unnecessary overhead to the execution of the CHECK constraint. The added complexity in the expression itself also increases the chance of a user defining the constraint incorrectly. Kind regards, Matthias van de Meent Databricks (https://www.databricks.com)
