X-Original-To: pgsql-sql@postgresql.org Received: from anchor-post-30.mail.demon.net (anchor-post-30.mail.demon.net [194.217.242.88]) by svr1.postgresql.org (Postfix) with ESMTP id 5037A5E46E0 for ; Tue, 24 Aug 2004 07:41:09 -0300 (ADT) Received: from mwynhau.demon.co.uk ([193.237.186.96] helo=mainbox.archonet.com) by anchor-post-30.mail.demon.net with esmtp (Exim 3.35 #1) id 1BzYjo-000FlH-0U; Tue, 24 Aug 2004 10:41:12 +0000 Received: from [192.168.1.17] (client17.archonet.com [192.168.1.17]) by mainbox.archonet.com (Postfix) with ESMTP id 1773716246; Tue, 24 Aug 2004 11:41:11 +0100 (BST) Message-ID: <412B1B47.6090202@archonet.com> Date: Tue, 24 Aug 2004 11:41:11 +0100 From: Richard Huxton User-Agent: Mozilla Thunderbird 0.7 (X11/20040615) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Patrice OLIVER Cc: "'pgsql-sql@postgresql.org'" Subject: Re: stored procedures and type of returned result. References: <412AFEBC.4060404@free.fr> <412B09B4.1080407@archonet.com> <412B15B1.5090208@free.fr> In-Reply-To: <412B15B1.5090208@free.fr> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Archive-Number: 200408/253 X-Sequence-Number: 18750 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