Re: PL/pgSQL and SETOF

From: Sam Mason <sam(at)samason(dot)me(dot)uk>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: PL/pgSQL and SETOF
Date: 2007-11-30 17:14:42
Message-ID: 20071130171442.GX1955@frubble.xen.chris-lamb.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Pavel Stehule 2007-11-30 17:16:25 Re: PL/pgSQL and SETOF
Previous Message Guido Neitzer 2007-11-30 17:11:49 Re: Linux v.s. Mac OS-X Performance