Denis BUCHER wrote: > I saw somwhere it could be the order of the fields ?
Not if you are doing "SELECT * FROM". Create an empty test database and a short script to create the table and function, insert a couple of rows then call the function. If you wrap the whole thing in BEGIN ... ROLLBACK we can change things until we see the problem. The other thing you could try is printing out row before returning it: RAISE NOTICE 'row = %', row; RETURN NEXT ROW; It might be you've not got what you were expecting. -- Richard Huxton Archonet Ltd -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql