Well I have been running the function using the data you sent against both an 8.4.1 and 8.4.9 instance on and off a good part of the day. At this point we are talking many thousands of runs. In either case I have not seen an error. So either I am incredibly lucky(I wish) or something is going on that is unique to your environment. At this point I am not quite where to go other then say, do what Tom recommends, upgrade to 8.4.10. Thanks for taking a look at it. I will be upgrading to 8.4.10 and I will keep you posted. -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general