Hello! On Tuesday 29 September 2009 08:11:36 Tom Jackson wrote: > How does '9999999999999999999'::int solve the problem?
The example return the equal result in different PostgreSQL versions (may be result can depend from platform). Strict type cast is defined in documentation and may be safety. And this is independant of the database schema. When you try to store 9999999999999999999 as is then database can translate it to integere and return otherflow error, or translate it to float or text without error. This depends of the database schema. So code can't be validated without the schema of the database. > If you need strict type checking in Tcl, try out the type code in > tWSDL. It has very good numeric type definition and validation > support. Thanks. > Dynamic typing? My database tables/columns don't change types. This > last example of yours is strange. Why would you have multiple > different types in one column? Why use a database at all? A lot of modern databases have dinamic typing. And Tcl has dinamic typing too. As example dinamic types is very useful for facts tables because external data may consists overflowed and other undefined data or text error messages in data sequences. Simple digital termometer can return float temperature values or some overload values like 'too cold', 'too hot' or other. Replace all undefined and overloaded values to NULLs is bad idea because NULL value have no any information. And dinamic typing can be helpful for column-based database storage. CREATE VIEW view_... as select *, (select value from ..._attribute where ..._id=uc.id and arg='value1') as value2, (select value from ..._attribute where ..._id=uc.id and arg='value2') as value2, ... from ... as us; So is possible to create "logical" tables with different count of columns and some other (same as low-density matrix). And of cource we can use strict typing for all fields where it is more useful. Best regards, Alexey Pechnikov. http://pechnikov.tel/ -- AOLserver - http://www.aolserver.com/ To Remove yourself from this list, simply send an email to <[email protected]> with the body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: field of your email blank.
