Re: PL/pgSQL and SETOF - Mailing list pgsql-general

From Sam Mason
Subject Re: PL/pgSQL and SETOF
Date
Msg-id 20071130171442.GX1955@frubble.xen.chris-lamb.co.uk
Whole thread Raw
In response to PL/pgSQL and SETOF  (Cultural Sublimation <cultural_sublimation@yahoo.com>)
Responses Re: PL/pgSQL and SETOF  (Cultural Sublimation <cultural_sublimation@yahoo.com>)
List pgsql-general
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

pgsql-general by date:

Previous
From: Guido Neitzer
Date:
Subject: Re: Linux v.s. Mac OS-X Performance
Next
From: "Pavel Stehule"
Date:
Subject: Re: PL/pgSQL and SETOF