Fixed bug in regard to types that require a "to_sql" option to work correctly. Removed Daveb's kludge to look for to_timestamp() directly. Fixed bugs in the test code, which was confusing the issue.
Add bind var support. Note incomplete hack to handle to_timestamp. Since when we construct the query we don't have access to the attribute/form datatypes. Also return new object_id in new_from_form procedure.