pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Roberto Mello <rmello@cc.usu.edu>
To: Mark Nielsen <python@kepnet.net>
Cc: pgsql-sql@postgresql.org
Subject: Re: How do I return more than one value in a postgresql pl/pgsql procedure?
Date: Sat, 23 Feb 2002 12:03:31 -0700
Message-ID: <20020223190331.GA3786@cc.usu.edu> (raw)
In-Reply-To: <3C768665.30500@kepnet.net>
References: <3C768665.30500@kepnet.net>

On Fri, Feb 22, 2002 at 12:56:53PM -0500, Mark Nielsen wrote:
> Hello!
> 
> I am have been trying to figure out how I can get a pl/pgsql procedure 
> to return more than one variable or perhaps a row. A procedure you 
> create can accept more than one variable, I don't see why it shoudn't be 
> able to return more than one variable in some fashion.I read rumors that 
>  pl/pgsql can return rows (which would contain one or more variables 
> per row), but I didn't find hard examples of how to do it.

See this:
http://developer.postgresql.org/docs/postgres/plpgsql-cursors.html

Especially the section "Using Cursors". This is the 7.3devel
documentation, but this section should work just as well for 7.2 (this
WON'T work for 7.1 and below).
 
> What table lists the stored procedures you created with pl/pgsql or 
> pl/perl? I was trying to find it with /dS in psql, but I didn't see 
> anything obvious.

pg_proc

-Roberto

-- 
+----| http://fslc.usu.edu/ USU Free Software & GNU/Linux Club |------+
  Roberto Mello - Computer Science, USU - http://www.brasileiro.net/ 
       http://www.sdl.usu.edu/ - Space Dynamics Lab, Developer    
Dammit no!  Don't pick on the pho^$ L%æ#!ø¯



view thread (2+ messages)

Message-ID: <20020223190331.GA3786@cc.usu.edu>
Permalink:  ../20020223190331.GA3786@cc.usu.edu/
Also on:    postgresql.org/message-id/20020223190331.GA3786@cc.usu.edu

 · 

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: rmello@cc.usu.edu, python@kepnet.net
  Subject: Re: How do I return more than one value in a postgresql pl/pgsql procedure?
  In-Reply-To: <20020223190331.GA3786@cc.usu.edu>

* 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