Implement "CAST(VARCHAR AS x)" for various x.