Re: How to write a function that manipulates a set of results - Mailing list pgsql-general

From Andreas Kretschmer
Subject Re: How to write a function that manipulates a set of results
Date
Msg-id 20070314180223.GA27187@KanotixBox
Whole thread Raw
In response to How to write a function that manipulates a set of results  (Ashley Moran <work@ashleymoran.me.uk>)
Responses Re: How to write a function that manipulates a set of results  (Ashley Moran <work@ashleymoran.me.uk>)
List pgsql-general
Ashley Moran <work@ashleymoran.me.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°

pgsql-general by date:

Previous
From: Randall Smith
Date:
Subject: Re: quoted identifier behaviour
Next
From: Tom Lane
Date:
Subject: Re: DST failing on 8.1.3