Anton Melser wrote: > I need to analyse some html to get some links out, and with only 25 > lines in exports_tmp_links (and text_to_parse no more than around > 10KB) this function has taken 10 minutes and counting. Something > horribly wrong is going on here! Can someone give me any pointers? I bet that you are running into an endless loop there. Try adding a few RAISE statements to find out what is happening, something like RAISE NOTICE 'I am here, and myvar = % and thatvar = %', myvar, thatvar; Yours, Laurenz Albe