Input is of form 'ppp','aaa','bbb' I want it to be stripped of quotes to become ppp,aaa,bbb escaping the quote would work but it means I will have to do some magic on the input as well to escape it prior to replacing it. select replace('AB\'A','\'','C') this works Can I buy a clue here? oh.. I;ve also tried to use quote_literal but no go.. ---------------------------(end of broadcast)--------------------------- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq