Fix potential problems when calling polymorphic SQL functions from Tcl
Some functions are defined in the database with the same number of a…
Show more
Fix potential problems when calling polymorphic SQL functions from TclSome functions are defined in the database with the same number ofarguments but different types, e.g., first argument "package_key"(type text) or "package_id" (type integer). This is fine from the SQLstandpoint, but when calling from Tcl via bind-vars(e.g. ":package_id"), everything is passed as a string, andpotentially, the wrong function is called.Now, all the automatically generated subs are generated with casts,when the integer based variant must be called.Some examples:Before: set s [ns_pg_bind 0or1row $__DB {select apm__set_value(:package_id,:parameter_name,:attr_value)}] set s [ns_pg_bind 0or1row $__DB {select apm__get_value(:package_id,:parameter_name)}]Now: set s [ns_pg_bind 0or1row $__DB {select apm__set_value(CAST(:package_id AS integer),:parameter_name,:attr_value)}] set s [ns_pg_bind 0or1row $__DB {select apm__get_value(CAST(:package_id AS integer),:parameter_name)}]- bumped version number to 5.10.1b11
Show less