On 2022-Dec-09, Tom Lane wrote: > I think though that it might be okay to just define this as > Not Our Problem. Although we don't seem to try to enforce it, > non-immutable domain check constraints are strongly deprecated > (the CREATE DOMAIN man page says that we assume immutability). > And not throwing errors is something that we usually consider > should ride along with immutability. So I think it might be > okay to say "if you want soft error treatment for a domain, > make sure its check constraints don't throw errors".
I think that's fine. If the user does, say "CHECK (value > 0)" and that results in a soft error, that seems to me enough support for now. If they want to do something more elaborate, they can write C functions. Maybe eventually we'll want to offer some other mechanism that doesn't require C, but let's figure out what the requirements are. I don't think we know that, at this point. -- Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/ "Estoy de acuerdo contigo en que la verdad absoluta no existe... El problema es que la mentira sí existe y tu estás mintiendo" (G. Lama)