Understanding setof

From: Robert James <srobertjames(at)gmail(dot)com>
To: Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Understanding setof
Date: 2014-04-04 19:42:49
Message-ID: CAGYyBghUoqXwf8WdA=ToZtsNAaw-N_DeFwPuGFb7VnuptbZokw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I'm having trouble with setof returning functions

Let's say I have function x() returning setof integers. I want to do
SELECT x(), but only keep the values which meet a criteria. Something
like: SELECT x() as xval WHERE xval = 10.

How can I do that?

In general, is there a way to "unroll" a setof into a regular query?

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Scott Marlowe 2014-04-04 19:51:35 Re: SSD Drives
Previous Message David Rees 2014-04-04 19:24:55 Re: SSD Drives