On Thu, Apr 5, 2012 at 8:50 PM, BareFeetWare <list....@barefeetware.com>wrote:
> On 06/04/2012, at 12:12 AM, Richard Hipp wrote: > > > The way SQLite keeps track of foreign key constraints is by use of a > counter. When foreign key constraints are violated, the counter increments > and when the constraints are resolved, the counter decrements, and an error > is issued at transaction commit if the counter is not zero. But if the > counter is not zero, we don't have any way of knowing which of the many > constraints caused the problem. > > Please change this. Use a hash table or array or something instead of a > counter so SQLite knows what constraint failed. I have no doubt that your > programming skill far exceeds mine, but this is a common requirement in > software design, even for a relative pleb like me. > There are tradeoffs here. "Better constraint error tracking" is just another way of say "runs slower and uses more memory". > > I have spent hours a day lately on a particular database design project > tracking down why constraints and foreign keys failed during batch imports. > More descriptive errors from SQLite would have saved me many of those hours. > > Thanks for your consideration, > Tom > > Tom Brodhurst-Hill > BareFeetWare > > -- > iPhone/iPad/iPod and Mac software development, specialising in databases > develo...@barefeetware.com > -- > Twitter: http://twitter.com/barefeetware/ > Facebook: http://www.facebook.com/BareFeetWare > > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > -- D. Richard Hipp d...@sqlite.org _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users