On 02/09/2008 12:18, tfinneid@xxxxxxxxxxxxxxxxxxxxx wrote: > Does that work in 8.2, cause i get the same error message as I described > above Yep, it does..... I should have mentioned that you call your function like this: select * from my_function() - in other words, a SETOF-returning function takes the place of a table in a SELECT statement. Can you show us more of your code? Ray. ------------------------------------------------------------------ Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland rod@xxxxxx Galway Cathedral Recitals: http://www.galwaycathedral.org/recitals ------------------------------------------------------------------