Re: stored procedures and type of returned result.

From: Richard Huxton <dev(at)archonet(dot)com>
To: Patrice OLIVER <oliverp21(at)free(dot)fr>
Cc: "'pgsql-sql(at)postgresql(dot)org'" <pgsql-sql(at)postgresql(dot)org>
Subject: Re: stored procedures and type of returned result.
Date: 2004-08-24 10:41:11
Message-ID: 412B1B47.6090202@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Patrice OLIVER wrote:
>
> Hello, I got this error message :
>
> ERROR: set-valued function called in context that cannot accept a set
> CONTEXT: PL/pgSQL function "lsttable" line 5 at return next

You need to treat set-returning functions as though they are tables.
SELECT * FROM lsttable();
NOT
SELECT lsttable();

--
Richard Huxton
Archonet Ltd

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Bruce Momjian 2004-08-24 11:20:39 Re: Disable trigger with Postgresql 7.4.x?
Previous Message Philippe Lang 2004-08-24 09:56:29 Re: stored procedures and type of returned result.