From: | Craig Ringer <ringerc(at)ringerc(dot)id(dot)au> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>, Jeff Davis <pgsql(at)j-davis(dot)com> |
Subject: | Re: FETCH in subqueries or CTEs |
Date: | 2012-08-25 08:41:31 |
Message-ID: | 50388FBB.1000600@ringerc.id.au |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 08/24/2012 10:31 PM, Tom Lane wrote:
> Craig Ringer <ringerc(at)ringerc(dot)id(dot)au> writes:
>> I didn't find a reasonable way to simply fetch a cursor into a (possibly
>> temporary) table, like:
>> INSERT INTO sometable FETCH ALL FROM somecursor;
> Why would you bother with a cursor, and not just INSERT ... SELECT
> using the original query?
I wouldn't. The context - and the reason it's mostly a matter of
curiosity, not something I care about - is that it arose out of
discussion elsewhere on how to work with pre-defined PL/PgSQL functions
that return multiple refcursors.
--
Craig Ringer
From | Date | Subject | |
---|---|---|---|
Next Message | Jukka Inkeri | 2012-08-25 09:06:17 | Permission denied for relation pg_database , one role has problem |
Previous Message | Chris Angelico | 2012-08-25 06:40:23 | Re: run function on server restart |