Re: Mutability of domain CHECK constraints

2018-12-29 Thread Tom Lane
Vik Fearing writes: > On 06/12/2018 15:41, Tom Lane wrote: >> So what I'm thinking we should do is document that the behavior of a >> domain CHECK constraint is expected to be immutable, and it's on the >> user's head to preserve consistency if it isn't. We could recommend >> that any attempt to

Re: Mutability of domain CHECK constraints

2018-12-29 Thread Vik Fearing
On 06/12/2018 15:41, Tom Lane wrote: > So what I'm thinking we should do is document that the behavior of a > domain CHECK constraint is expected to be immutable, and it's on the > user's head to preserve consistency if it isn't. We could recommend > that any attempt to change a constraint's behav

Mutability of domain CHECK constraints

2018-12-06 Thread Tom Lane
ALTER DOMAIN ADD CONSTRAINT goes to some effort to verify that existing stored data of the domain type meets the new constraint. (It's not bulletproof, because it can't see uncommitted data, but at least it tries.) However, what if the user tries to change the behavior of an existing constraint c