On Fri, Oct 30, 2009 at 03:19:59PM -0500, Nicolas Williams scratched on the wall: > I should add that a pragma that cause CHECK constraints to be > automatically created for enforcing strong typing in subsequent CREATE > TABLE statements
That's tricky. Values have TYPES. Columns have AFFINITIES. There is not a clear or obvious one-to-one mapping between them in all cases. The CREATE TABLE column datatypes can be used to figure out the column affinity, but that doesn't always make it clear what value type should go in the CHECK expression. Also, CHECK expressions need to go into the CREATE TABLE definition. They can't be added after-the-fact, like key triggers. There are ways around this, of course, but they're kind of messy. -j -- Jay A. Kreibich < J A Y @ K R E I B I.C H > "Our opponent is an alien starship packed with atomic bombs. We have a protractor." "I'll go home and see if I can scrounge up a ruler and a piece of string." --from Anathem by Neal Stephenson _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users