Re: [GENERAL] How do we combine and return results from multiple queries in a loop?

2011-05-17 Thread Bernardo Telles
, Bernardo Telles wrote: > Hi Pavel, I'm running 8.4 > > > On Mon, May 16, 2011 at 3:58 PM, Pavel Stehule wrote: > >> Hello >> >> 2011/5/16 Bernardo Telles : >> > Wow, you guys are some fast-acting dudes (and yes, I am an adult, but a >> kid >

Re: [GENERAL] How do we combine and return results from multiple queries in a loop?

2011-05-16 Thread Bernardo Telles
Hi Pavel, I'm running 8.4 On Mon, May 16, 2011 at 3:58 PM, Pavel Stehule wrote: > Hello > > 2011/5/16 Bernardo Telles : > > Wow, you guys are some fast-acting dudes (and yes, I am an adult, but a > kid > > at heart). > > > > David, yup, that's exa

Re: [GENERAL] How do we combine and return results from multiple queries in a loop?

2011-05-16 Thread Bernardo Telles
“append” are synonyms in this context; otherwise the above > quote from section 39.6.1 is basically a word-for-word answer to your > question. > > > > David J. > > > > *From:* pgsql-general-ow...@postgresql.org [mailto: > pgsql-general-ow...@postgresql.org] *On Beh

Re: [GENERAL] How do we combine and return results from multiple queries in a loop?

2011-05-16 Thread Bernardo Telles
queries. Someone mentioned that one way to do that is to use a temporary table inside the partiesWithin function. Any thoughts? On Mon, May 16, 2011 at 1:28 AM, John R Pierce wrote: > On 05/15/11 8:53 PM, Bernardo Telles wrote: > >> Hi there, >> We'd like to use a plpgsql

[GENERAL] How do we combine and return results from multiple queries in a loop?

2011-05-15 Thread Bernardo Telles
Hi there, We'd like to use a plpgsql function to use results from query A to execute several queries B, C, etc., and return the results of all B, C, etc queries as one result set. Would placing 'RETURN QUERY' inside a loop automatically concatenate all 'return query' results in the function's retur