X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 61776D1DF92 for ; Sun, 15 Feb 2004 21:21:19 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 92896-04 for ; Sun, 15 Feb 2004 17:21:19 -0400 (AST) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by svr1.postgresql.org (Postfix) with ESMTP id 5BFF9D1DF7F for ; Sun, 15 Feb 2004 17:21:17 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.11/8.12.11) with ESMTP id i1FLL3w2010639; Sun, 15 Feb 2004 16:21:03 -0500 (EST) To: iseyfi@vt.edu (ismail) Cc: pgsql-sql@postgresql.org Subject: Re: returning multiple resultset? In-reply-to: <357f5505.0402091527.394e0a30@posting.google.com> References: <357f5505.0402091527.394e0a30@posting.google.com> Comments: In-reply-to iseyfi@vt.edu (ismail) message dated "09 Feb 2004 15:27:27 -0800" Date: Sun, 15 Feb 2004 16:21:03 -0500 Message-ID: <10638.1076880063@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200402/177 X-Sequence-Number: 16867 iseyfi@vt.edu (ismail) writes: > I am fairly new to PostgreSQL and I am right now converting a database > from SQL server. SQL server can return multiple select statements in > the function body. Is there any way to return a function with two > different resultsets? You can fake it in some cases by returning opened cursors. See the plpgsql docs' discussion of working with cursors. Of course this will only work for resultsets that you can specify as a SQL query. regards, tom lane