Re: returning a resultset from a function

From: Erik Jones <erik(at)myemma(dot)com>
To: anton(dot)andreev(at)fmi(dot)uni-sofia(dot)bg
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: returning a resultset from a function
Date: 2008-02-15 21:34:15
Message-ID: B6FCAF76-05D5-4DC3-97D4-6453DC43CB0B@myemma.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On Feb 15, 2008, at 2:56 PM, Anton Andreev wrote:

> Hi,
>
> How do I return a result set? Is there a better way in 'plpgsql'
> than the one described below?
> I do not want to make a select from a function(which pretty useful
> in many cases):
> SELECT * FROM getfoo();
> , but I want to just call the function with SELECT getfoo();

This article covers a way to do that: http://www.postgresonline.com/
journal/index.php?/categories/9-advanced.

Erik Jones

DBA | Emma®
erik(at)myemma(dot)com
800.595.4401 or 615.292.5888
615.292.0777 (fax)

Emma helps organizations everywhere communicate & market in style.
Visit us online at http://www.myemma.com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Greg Smith 2008-02-15 21:36:57 Re: PG quitting sporadically!!
Previous Message Keaton Adams 2008-02-15 21:31:41 Why isn't an index being used when selecting a distinct value?