On 08/24/2012 10:31 PM, Tom Lane wrote:
Craig Ringer 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 q
Craig Ringer 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?
Putting a cursor in between w
2012/8/24 Craig Ringer :
> On 08/24/2012 12:34 PM, Pavel Stehule wrote:
>
>> you can't mix planned and unplanned statements together - think about
>> stored plans every time
>
>
> Thanks Pavel and Jeff.
>
> I can't say I fully understand the arguments, but I'll take it that
> accepting cursors in C
On 08/24/2012 12:34 PM, Pavel Stehule wrote:
you can't mix planned and unplanned statements together - think about
stored plans every time
Thanks Pavel and Jeff.
I can't say I fully understand the arguments, but I'll take it that
accepting cursors in CTEs or subqueries wouldn't make sense. I
Hello
2012/8/24 Craig Ringer :
> Hi all
>
> I've noticed that FETCH doesn't seem to be supported in subqueries or in
> CTEs.
>
> Is there a specific reason for that, beyond "nobody's needed it and
> implemented it"? I'm not complaining at all, merely curious.
>
> A toy example:
>
> DECLARE som
On Fri, 2012-08-24 at 09:35 +0800, Craig Ringer wrote:
> Hi all
>
> I've noticed that FETCH doesn't seem to be supported in subqueries or in
> CTEs.
>
> Is there a specific reason for that, beyond "nobody's needed it and
> implemented it"? I'm not complaining at all, merely curious.
1. Cursors