The function should be called as "select * from function_name (xyz)" rather than "select from function_name (xyz)", I would guess. Rory On 21/04/04, Froggy / Froggy Corp. (froggy@froggycorp.com) wrote: > I allways get the same error : > > ERROR: set-valued function called in context that cannot accept a set -- Rory Campbell-Lange <rory@campbell-lange.net> <www.campbell-lange.net> ---------------------------(end of broadcast)--------------------------- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match