I believe I understand Darren's point (whether or not I care for them is another story).
On Fri, Oct 30, 2009 at 2:22 AM, Roger Binns <rog...@rogerbinns.com> wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Darren Duncan wrote: >> But on a newer SQLite that implements the stronger typing support I proposed, >> when that feature is active then columns with declared types like INTEGER/etc >> would enforce that only values of that type are stored there, > > I might have misunderstood you. Do you really mean that a new SQLite > version should enforce the types with 'UNIVERSAL' meaning any? Do you > really expect everyone to have to upgrade their database schemas for this? No, (I think what) Darren is saying is that a column with type UNIVERSAL will behave as if that column had no CHECKs at all. It would not enforce any type, and behave, more or less, like any SQLite column except for INTEGER PRIMARY KEY currently behaves. That is, UNIVERSAL would allow storing anything in it. > >> shorthand for an appropriate CHECK constraint, > > Now I am even more confused. There is this alleged group of people out > there who need type enforcing but are somehow unable to put in CHECK > constraints (which also let you addition stuff like range checks and other > restrictions on values), so the rest of us would have to start littering our > schemas with 'UNIVERSAL' to cater for them? Any column not declared as UNIVERSAL, so, INTEGER, REAL, BLOB, TEXT, perhaps even a new type called DATETIME, would behave as if CHECK CONSTRAINT were defined on them, allowing only the declared type of data to be stored in them. > > I have yet to see a clear demonstration of two things: > > Why developers who want particular type/value constraints are unable to just > go ahead and use constraints? There is really no understandable reason for this other that perhaps psychology and a bad kind of laziness. > > Why developers who want 'strong types' don't realise that modulo type > affinity you get out what you put in so don't put in "wrong" types! > > In short what problem actually needs to be solved and what is wrong with the > existing tools for those who have the problem? I see no problem with the existing tools, but, on the other hand, I really see no problem with Darren's suggestion as well other than it might make SQLite less Lite and more Heavy. But, I certainly see no backward compatibility issues with Darren's suggestion. His suggestion allows those who care for strong typing, but are too lazy to do it themselves, will actually have it done for them, and those who don't care for strong typing can use UNIVERSAL. Actually, there can be one bad effect of Darren's suggestion, now that I think of it, and that would be for those who don't care for strong typing. They will end up getting strong typing for all non-UNIVERSAL columns whether they like it or not, whether they expect it or not, unless there is a pragma as well to just disable strong typing completely. See, it is getting less Lite and more Heavy. At this point, those who are dissatisfied with SQLite should just move to PostGres of MySQL. > > Roger > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.9 (GNU/Linux) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > > iEYEARECAAYFAkrqlEEACgkQmOOfHg372QTCPACgkdvchMq2NzAU7n4cSKXABUNF > YGMAn3buLfY4gfVoEeyeTYGA2UC1I4dL > =3FL+ > -----END PGP SIGNATURE----- > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > -- Puneet Kishor http://www.punkish.org Carbon Model http://carbonmodel.org Charter Member, Open Source Geospatial Foundation http://www.osgeo.org Science Commons Fellow, http://sciencecommons.org/about/whoweare/kishor Nelson Institute, UW-Madison http://www.nelson.wisc.edu ----------------------------------------------------------------------- Assertions are politics; backing up assertions with evidence is science ======================================================================= Sent from Madison, WI, United States _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users