From davhas@bellsouth.net Thu Jun 27 20:42:35 2002 Received: from localhost.localdomain (postgresql.org [64.49.215.8]) by localhost (Postfix) with ESMTP id 12059476892 for ; Thu, 27 Jun 2002 16:42:35 -0400 (EDT) Mailbox-Line: From davhas@bellsouth.net Thu Jun 27 16:42:35 2002 Received: from imf09bis.bellsouth.net (mail209.mail.bellsouth.net [205.152.58.149]) by postgresql.org (Postfix) with ESMTP id 4B9054771D4 for ; Thu, 27 Jun 2002 16:33:46 -0400 (EDT) Received: from dch ([208.61.185.9]) by imf09bis.bellsouth.net (InterMail vM.5.01.04.19 201-253-122-122-119-20020516) with SMTP id <20020627203513.XKLH11221.imf09bis.bellsouth.net@dch> for ; Thu, 27 Jun 2002 16:35:13 -0400 Message-ID: <001601c21e19$ef9c5190$3bfea8c0@dch> From: "David Hassell" To: Subject: Function question Date: Thu, 27 Jun 2002 15:33:45 -0500 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0013_01C21DF0.0690E1B0" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4807.1700 Disposition-Notification-To: "David Hassell" X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700 X-Spam-Status: No, hits=1.4 required=5.0 tests=SUPERLONG_LINE,RCVD_IN_MULTIHOP_DSBL, X_RCVD_IN_UNCONFIRMED_DSBL,FUDGE_MULTIHOP_RELAY version=2.30 X-Spam-Level: * X-Archive-Number: 200206/390 X-Sequence-Number: 8355 This is a multi-part message in MIME format. ------=_NextPart_000_0013_01C21DF0.0690E1B0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I am new to pgsql having worked with M$SQL for a while, my question would b= e 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_000_0013_01C21DF0.0690E1B0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
I am new to pgsql having worked with M$SQL= for a=20 while, my question would be if functions are the equivelent to Stored=20 Procedures, how does one return a rowset, instead of a single typed=20 variable?  If this is the wrong group, my apologies and please point m= e to=20 the correct one.
 
Thanks,
David
------=_NextPart_000_0013_01C21DF0.0690E1B0-- From SBrett@e-mis.com Fri Jun 28 14:15:25 2002 Received: from localhost.localdomain (postgresql.org [64.49.215.8]) by localhost (Postfix) with ESMTP id 83598476007 for ; Fri, 28 Jun 2002 10:15:25 -0400 (EDT) Mailbox-Line: From SBrett@e-mis.com Fri Jun 28 10:15:25 2002 Received: from cicero.e-mis.co.uk (cicero.e-mis.co.uk [212.240.194.162]) by postgresql.org (Postfix) with ESMTP id C4D954774AC for ; Fri, 28 Jun 2002 09:40:05 -0400 (EDT) Received: from hirtius.emis.local ([192.168.139.253] helo=hirtius) by cicero.e-mis.co.uk with esmtp (Exim 3.35 #1 (Debian)) id 17Nvyp-0001Uu-00; Fri, 28 Jun 2002 14:40:07 +0100 Received: from sv-cntrmail.emis.local ([10.139.1.4] helo=sv-cntrmail.ndu-emis.demon.co.uk) by hirtius with esmtp (Exim 3.35 #1 (Debian)) id 17Nwx6-0003ab-00; Fri, 28 Jun 2002 15:42:24 +0100 Received: by sv-cntrmail.emis.local with Internet Mail Service (5.5.2653.19) id ; Fri, 28 Jun 2002 14:38:13 +0100 Message-ID: From: Steve Brett To: David Hassell , pgsql-sql@postgresql.org Subject: Re: Function question Date: Fri, 28 Jun 2002 14:38:11 +0100 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C21EA9.0BCF8190" X-Spam-Status: No, hits=-1.0 required=5.0 tests=MIME_NULL_BLOCK version=2.30 X-Spam-Level: X-Archive-Number: 200206/391 X-Sequence-Number: 8356 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_01C21EA9.0BCF8190 Content-Type: text/plain; charset="iso-8859-1" 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_01C21EA9.0BCF8190 Content-Type: text/html; charset="iso-8859-1"
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_01C21EA9.0BCF8190-- From jie@stbernard.com Fri Jun 28 16:05:55 2002 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--