pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: iseyfi@vt.edu
Cc: pgsql-sql@postgresql.org
Subject: Re: returning multiple resultset?
Date: Sun, 15 Feb 2004 16:21:03 -0500
Message-ID: <10638.1076880063@sss.pgh.pa.us> (raw)
In-Reply-To: <357f5505.0402091527.394e0a30@posting.google.com>
References: <357f5505.0402091527.394e0a30@posting.google.com>

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



view thread (2+ messages)

Message-ID: <10638.1076880063@sss.pgh.pa.us>
Permalink:  ../10638.1076880063@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/10638.1076880063@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: tgl@sss.pgh.pa.us, iseyfi@vt.edu
  Subject: Re: returning multiple resultset?
  In-Reply-To: <10638.1076880063@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox