On Fri, Nov 30, 2007 at 09:09:28AM -0800, Cultural Sublimation wrote: > Postgresql complains that "set-valued > function called in context that cannot accept a set". Anyway, what am > I doing wrong, and what is the simplest way of translating get_items > in PL/pgSQL? I would guess you're calling it like: SELECT get_items2(); whereas, you should call set returning functions like: SELECT * FROM get_items2(); Sam ---------------------------(end of broadcast)--------------------------- TIP 2: Don't 'kill -9' the postmaster