Hi!
Yes, continuing like that where applicable would be good. However, there are places in the code where the input can be a string OR a number. s9y offers an abstract "name, value" association in the serendipity_config DBtable.
Some plugins store numbers, some store strings in those fields. In some cases, SQL lookups uses ">" or "<" comparison logic, while in others a "=" comparison is used, and for the lookup we cannot safely use a cast because the field values might differ.
I don'T remember the exact places of stuff like this, and there's also this:
http://board.s9y.org/viewtopic.php?t=12 ... licit+cast
The column name can be altered by plugins, and the column value also. So some plugin might set the column from "id" to "title", and the value matchup might be changedfrom "82" to "string", and where the SQL query is joined, the code does not really know what thefinal outcomewill be.
A general "LIKE" was used currently, because it fitted in all SQL engines,until PGSQL changed their view and enforced a hard compatibility
break. The only way I see to change this is to make one giant introspection function that checks each column type before it is queried, which of course puts performance pressure on the DB.Or the checks would need to be hardcodded, but then it would not be so flexible to a plugin API approach and all new possible columns would needed to be addedto the white/blacklist.
So I'd really like to still appreciate implicit casts. The sql engine should imho do that for me as a convenience function, especially if such beaviour existed in past versions and is used in alot of code.
Regards,
Garvin