-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Darren Duncan wrote:
> I should point out, for people reading this thread, that it is very possible 
> to 
> have both the amount of type flexibility that SQLite provides and have strict 
> typing, at the same time.

What I fail to understand with all these "complaints" about SQLite's typing
is what the problem actually is.  The documentation is very clear:

  http://sqlite.org/datatype3.html

But that aside if you don't want an integer stored in a column then don't
store an integer in that column!  You can use check constraints to ensure
data typing (as well as ranges and similar validation), and you can use
(case plus) cast if you want to munge the data from one type to another.

So what exactly is wrong with SQLite's behaviour of you get out what you put
in (modulo the affinity stuff)?

> In fact this support might even be easier as it may only require enhancements 
> to 
> the SQL parser, which would generate VM opcodes like for a CHECK constraint, 
> unless further work is done to optimize for the presented cases, or to 
> enhance 
> semantics.

It has been stated in several places that the increasing items in the parser
will lead to various fields needing to go to the next size up which would
increase memory consumption.  There is also the whole backwards
compatibility angle - what would happen if the database was loaded into an
older version of SQLite which then ignored this whole UNIVERSAL thing
allowing "wrongly" typed data to be inserted?

As the Doctor says, if it hurts when you do that, then don't do that!

Roger
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEUEARECAAYFAkrqET4ACgkQmOOfHg372QTO1ACfU/LTcp/6Ey3kVLEDgoCx+7Wb
JecAl0xYvI4/EOMG6XBVFHLaz0MhIMM=
=0w5f
-----END PGP SIGNATURE-----
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to