multiple results from a function

From: James Harper <james(dot)harper(at)bendigoit(dot)com(dot)au>
To: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: multiple results from a function
Date: 2014-02-28 00:23:38
Message-ID: 6035A0D088A63A46850C3988ED045A4B6F3BD70A@BITCOM1.int.sbss.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I see that I can use PQgetResult to get results from an async query, and this allows for multiple results, presumably when the query is like "SELECT 123, 456; SELECT 'ABC', 'DEF';". Is there a way for a C function, using SPI, to send result sets without waiting for completion and returning a potentially huge set of results right at the end of the function?

Failing that, is there a way for a C function to send to STDOUT in the same way that a COPY (...) TO STDOUT would?

Thanks

James

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jason Daly 2014-02-28 02:54:58 'tuple concurrently updated' error when granting permissions
Previous Message Brett Mc Bride 2014-02-28 00:16:28 Re: Josh's Comments on Hstore / Jsonb