Search Postgresql Archives

Re: Understanding setof

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Apr 4, 2014 at 12:42 PM, Robert James <srobertjames@xxxxxxxxx> wrote:
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?

Just add a FROM:

select * from x() as xval where xval=10;

Cheers,

Jeff

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux