Description:
Hello, we randomly generated some SQL statements during database testing. Our table creation statement triggered an error in the check constraint part. The error showed that our constraints were associated with data in other columns, but our constraints did not It is not related to other columns, it is just a conditional expression. Is this a bug or a problem with incorrect error information?
How to repeat:
CREATE TABLE t0(c0 DECIMAL UNIQUE KEY DEFAULT 0.2921954450911477 CHECK((((NULL) NOT IN (NULL)) IS FALSE) IS NOT FALSE) , c1 DECIMAL UNIQUE PRIMARY KEY NOT NULL) ;
actual: error:Column check constraint 't0_chk_1' references other column
expected: execution succeed
Suggested fix:
We believe that the check constraint in our table creation statement complies with the grammatical specifications. Even if you think this constraint is meaningless, it finally returned a Boolean value and we did not reference other columns. We think we should not Get an error message like this