Re: Mutable CHECK constraints?

2023-01-24 Thread Laurenz Albe
On Tue, 2023-01-24 at 01:38 -0500, Tom Lane wrote: > Laurenz Albe writes: > > We throw an error if the expression in a CREATE INDEX statement is not > > IMMUTABLE. > > But while the documentation notes that expressions in CHECK constraints are > > not > > to be immutable, we don't enforce that. 

Re: Mutable CHECK constraints?

2023-01-23 Thread Tom Lane
Laurenz Albe writes: > We throw an error if the expression in a CREATE INDEX statement is not > IMMUTABLE. > But while the documentation notes that expressions in CHECK constraints are > not > to be immutable, we don't enforce that. Why don't we call something like > CheckMutability inside

Mutable CHECK constraints?

2023-01-23 Thread Laurenz Albe
We throw an error if the expression in a CREATE INDEX statement is not IMMUTABLE. But while the documentation notes that expressions in CHECK constraints are not to be immutable, we don't enforce that. Why don't we call something like CheckMutability inside cookConstraint? Sure, that wouldn't