[Vmail-discuss] Finally... vmail-0.4
Paul Warren
pdw@xxxxxxxxxxxxx
Tue, 31 Jul 2001 17:32:34 +0100
On Tue, Jul 31, 2001 at 03:10:36AM -0700, Paul Makepeace wrote:
> > I'm not sure it's a well thought out position, but my
> > point is that in MySQL you can readily construct databases
> > which are inconsistent in the sense of not satisfying
> > `foreign key constraints'.
>
> I think if you're trying to simulate some FK constraint how about
> funnelling all changes through particular scripts that enforce them in
> the code or even periodically running SQL to check for errors (e.g.,
> <sql>select domain_name from popbox where domain_name not in (select
> domain_name from domain)</sql> -- Of course now you'll tell me MySQL
> doesn't support subqueries...).
:-)
I think you're right - sanity checking the DB shouldn't be done at
query-time. You will notice that for consistency the default forwarder
stuff doesn't do this :-)
> > IMO it's better that the
> > system's response to that situation is conservative
> > (reject the mail) than liberal (possibly misdirect it).
>
> I agree but I think a per-delivery hit to check just one of any number
> of particular db integrity failures is expensive and might lead the less
> clueful into a false sense of security (if they even realise it's for
> that not just an error which is what I thought it was). YMMV :-)
Agree. A period DB integrity check sounds like the way forward. Either
that or a proper database :-)
Paul