Re: How to write a function that manipulates a set of results

From: Andreas Kretschmer <akretschmer(at)spamfence(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: How to write a function that manipulates a set of results
Date: 2007-03-14 18:02:23
Message-ID: 20070314180223.GA27187@KanotixBox
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Ashley Moran <work(at)ashleymoran(dot)me(dot)uk> schrieb:
> The closest I've come from reading the docs is functions that return
> SETOF. However I can't see any way to query the result set like a table.

Right.

> Can anyone offer any hints/links?

select * from <insert_your_srf-function_here>.

For instance, if your SRF-function is called foo(), do:

select * from foo();

Andreas
--
Really, I'm not out to destroy Microsoft. That will just be a completely
unintentional side effect. (Linus Torvalds)
"If I was god, I would recompile penguin with --enable-fly." (unknow)
Kaufbach, Saxony, Germany, Europe. N 51.05082°, E 13.56889°

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ashley Moran 2007-03-14 18:50:27 Re: How to write a function that manipulates a set of results
Previous Message Tom Lane 2007-03-14 18:00:59 Re: DST failing on 8.1.3