Received: from localhost.localdomain (postgresql.org [64.49.215.8]) by localhost (Postfix) with ESMTP id 2792D475C4B for ; Fri, 28 Jun 2002 12:05:55 -0400 (EDT) Mailbox-Line: From jie@stbernard.com Fri Jun 28 12:05:55 2002 Received: from MAIL01.stbernard.com (mail01.stbernard.com [64.154.93.162]) by postgresql.org (Postfix) with ESMTP id E3065475E7E for ; Fri, 28 Jun 2002 11:26:47 -0400 (EDT) Received: by MAIL01.stbernard.com with Internet Mail Service (5.5.2653.19) id ; Fri, 28 Jun 2002 08:26:52 -0700 Message-ID: <7C760DAA511DC74B99E7D22189F786F101BF2102@MAIL01.stbernard.com> From: Jie Liang To: 'Steve Brett' , David Hassell , pgsql-sql@postgresql.org Subject: Re: Function question Date: Fri, 28 Jun 2002 08:26:43 -0700 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C21EB8.352A3710" X-Spam-Status: No, hits=-1.0 required=5.0 tests=MIME_NULL_BLOCK version=2.30 X-Spam-Level: X-Archive-Number: 200206/394 X-Sequence-Number: 8359 This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_001_01C21EB8.352A3710 Content-Type: text/plain; charset="iso-8859-1" Before v7.2, you have no way to resolve this, however, from v7.2, you can return a cursor with PL/pgSQL, so I think you may resolve this problem by cursor. But I haven't tested it yet. Jie Liang -----Original Message----- From: Steve Brett [mailto:SBrett@e-mis.com] Sent: Friday, June 28, 2002 6:38 AM To: David Hassell; pgsql-sql@postgresql.org Subject: Re: [SQL] Function question i think you declare 'return set of int' as the retunr type of the function, but i'm not sure if you can return a set of rows as a dataset from a function. i guess you could define a data type as a row and retunr a set of them but i'm only guessing as my knowledge /experience doesn't stretch that far i'm afraid .... Steve -----Original Message----- From: David Hassell [mailto:davhas@bellsouth.net] Sent: 27 June 2002 21:34 To: pgsql-sql@postgresql.org Subject: [SQL] Function question I am new to pgsql having worked with M$SQL for a while, my question would be if functions are the equivelent to Stored Procedures, how does one return a rowset, instead of a single typed variable? If this is the wrong group, my apologies and please point me to the correct one. Thanks, David ------_=_NextPart_001_01C21EB8.352A3710 Content-Type: text/html; charset="iso-8859-1"
Before v7.2, you have no way to resolve this, however, from v7.2, you can return a cursor with PL/pgSQL, so I think you may resolve this problem by cursor. But I haven't tested it yet.
 
Jie Liang
 
 
-----Original Message-----
From: Steve Brett [mailto:SBrett@e-mis.com]
Sent: Friday, June 28, 2002 6:38 AM
To: David Hassell; pgsql-sql@postgresql.org
Subject: Re: [SQL] Function question

i think you declare 'return set of int' as the retunr type of the function, but i'm not sure if you can return a set of rows as a dataset from a function. i guess you could define a data type as a row and retunr a set of them but i'm only guessing as my knowledge /experience doesn't stretch that far i'm afraid ....
 
Steve
-----Original Message-----
From: David Hassell [mailto:davhas@bellsouth.net]
Sent: 27 June 2002 21:34
To: pgsql-sql@postgresql.org
Subject: [SQL] Function question

I am new to pgsql having worked with M$SQL for a while, my question would be if functions are the equivelent to Stored Procedures, how does one return a rowset, instead of a single typed variable?  If this is the wrong group, my apologies and please point me to the correct one.
 
Thanks,
David
------_=_NextPart_001_01C21EB8.352A3710--