I used the internal function text_pattern_lt and it is working fine! Thanks for helping.
cheers Suresh ---------------------------(end of broadcast)--------------------------- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match