> The problem is we are using PostGres 7.1.In this version REPLACE() is not
> available.
It sounded like you were just starting to work on the change over. I
highly suggest upgrading to 7.3 at the very least, 7.4 if you're going
to be a few months prior to going to production. A ton of good work has
been put into PostgreSQL in the last couple of years.
Anyway, you'll need to write your own replace() if you stick with that
release.