pg.ddx.io pgsql-sql@postgresql.org mailing list archivehelp / color / mirror / Atom feed
How do I return more than one value in a postgresql pl/pgsql procedure? 2+ messages / 2 participants [nested] [flat]
* How do I return more than one value in a postgresql pl/pgsql procedure? @ 2002-02-22 17:56 Mark Nielsen <python@kepnet.net> 0 siblings, 1 reply; 2+ messages in thread From: Mark Nielsen @ 2002-02-22 17:56 UTC (permalink / raw) To: pgsql-sql 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. 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. Thanks! Mark ^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: How do I return more than one value in a postgresql pl/pgsql procedure? @ 2002-02-23 19:03 Roberto Mello <rmello@cc.usu.edu> parent: Mark Nielsen <python@kepnet.net> 0 siblings, 0 replies; 2+ messages in thread From: Roberto Mello @ 2002-02-23 19:03 UTC (permalink / raw) To: Mark Nielsen <python@kepnet.net>; +Cc: pgsql-sql 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%æ#!ø¯ ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2002-02-23 19:03 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2002-02-22 17:56 How do I return more than one value in a postgresql pl/pgsql procedure? Mark Nielsen <python@kepnet.net> 2002-02-23 19:03 ` Roberto Mello <rmello@cc.usu.edu>
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