On 2025-Jan-15, Amul Sul wrote: > I might be mistaken, but I believe this behavior is reasonable since > we're creating a new table with no data initially. Future inserts will > be validated against the constraint, ensuring all data added complies > with it. Given that any data in the table at any time will be valid > according to the constraint, marking it as "VALID" seems like the > correct approach, IMO.
Yes to all of the above. But the complaint is not that the behavior is incorrect. The complaint is that users add NOT VALID and the code silently behaves as if the parameter was not given, which surprises them unpleasantly. The WARNING message is there to tell them "look, I realize you wanted to do this, but I know better, so I decided to ignore you." That's all. -- Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/ "Use it up, wear it out, make it do, or do without"