Not nearly as much effort as what you're trying to do, but good luck.
Scanning the application code to add casting info could be a pain and I may not be sure if I have done that for all the function calls/string comparisons. Moreover I need to repeat this process from scratch for each customer/migration project.
Whereas if I have something handy (a set of override functions) I can do it easily for every project. Moreover, PostgreSQL has a very organized list of functions and decent documentation about arguments and return type. This makes my task easy for building this one time set of override function. :-)
David's solution is what I would have suggested had he not said it already.
Thanks both of you for your help and suggestions :-)
Best Regards,
Sameer Kumar | Database Consultant
ASHNIK PTE. LTD.
101 Cecil Street, #11-11 Tong Eng Building, Singapore 069533