Received: from localhost (unknown [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 9C7272E31F9 for ; Wed, 28 Nov 2007 18:42:56 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 18144-05 for ; Wed, 28 Nov 2007 18:42:52 -0400 (AST) Received: from sd-2317.dedibox.fr (sd-2317.dedibox.fr [88.191.17.192]) by postgresql.org (Postfix) with ESMTP id 310322E31D1 for ; Wed, 28 Nov 2007 18:42:52 -0400 (AST) Received: from sd-2317.dedibox.fr (localhost.localdomain [127.0.0.1]) by sd-2317.dedibox.fr (Postfix) with ESMTP id 77F6110A1D; Wed, 28 Nov 2007 23:42:17 +0100 (CET) Received: from [192.168.10.1] (ASte-Genev-Bois-153-1-31-100.w83-112.abo.wanadoo.fr [83.112.77.100]) by sd-2317.dedibox.fr (Postfix) with ESMTP id 2C1BDC231; Wed, 28 Nov 2007 23:42:17 +0100 (CET) Message-ID: <474DEEC8.80502@lelarge.info> Date: Wed, 28 Nov 2007 23:42:16 +0100 From: Guillaume Lelarge User-Agent: Thunderbird 2.0.0.6 (X11/20071022) MIME-Version: 1.0 To: Bruce Momjian CC: Alvaro Herrera , Tom Lane , Neil Conway , pgsql-docs@postgresql.org Subject: Re: Two fixes for plpgsql.sgml References: <200711282147.lASLlxR10356@momjian.us> In-Reply-To: <200711282147.lASLlxR10356@momjian.us> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Scanned: ClamAV using ClamSMTP X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200711/116 X-Sequence-Number: 4649 Bruce Momjian a écrit : > Alvaro Herrera wrote: >>[...] >> The point of "any datatype they can return a single instance of" is that >> this can be a set of scalar values (e.g. "RETURNS SETOF int") or of a >> complex type ("RETURNS SETOF table"), or anything else they can return a >> single instance of :-P (SETOF anyelement? SETOF table%TYPE?) > > Good idea, updated: > > PL/pgSQL functions can also be declared to return > a set (or table) of any data type that can be returned as > a single instance. Such a function generates its output by executing > RETURN NEXT for each desired element of the result > set, or by using RETURN QUERY to output the result of > evaluating a query. > Great. Now I better understand this part. Thank you all. -- Guillaume. http://www.postgresqlfr.org http://dalibo.com