Search Postgresql Archives

How to write a function that manipulates a set of results

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

 



Hi

I'm passing this on second hand so forgive me if I'm a bit vague...

My boss is trying to write a function in PL/pgsql that manipulates a small, temporary set of data. It fetches about 20 rows from a table of approx 4 million, then it needs to do further calculations to narrow them down further. Previously we have only written database code for SQL Server, and there we would use a table variable. Apparently temporary tables are not equivalent and not suitable for this.

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. Can anyone offer any hints/links?

Thanks
Ashley


[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