Re: Status report on writeable CTEs - Mailing list pgsql-hackers

From Hitoshi Harada
Subject Re: Status report on writeable CTEs
Date
Msg-id AANLkTik07uBLh6XpoyvbeUBbHBDVRGBPACDoBELBkvBj@mail.gmail.com
Whole thread Raw
In response to Status report on writeable CTEs  (Marko Tiikkaja <marko.tiikkaja@cs.helsinki.fi>)
Responses Re: Status report on writeable CTEs
List pgsql-hackers
2010/7/13 Marko Tiikkaja <marko.tiikkaja@cs.helsinki.fi>:
> Hi,
>
>
> I've been working on writeable CTEs during the last couple of months, but
> right now it looks like I'm going to miss the first commit fest for 9.1.  I
> was trying to make it work by expanding all wCTEs to their own Queries
> during the rewrite stage (a very crude patch trying to do that for regular
> CTEs attached), but I don't think that it's a good way of approaching the
> problem.  Consider:

Sorry it's not relevant to the topic you post but it seems you're
going to add new executor node called DtScanNode and let it hold
tuplestore passed by the Query indicated by index number. However, I
suppose there are other ways:

1. Use MaterialNode instead of adding DtScanNode. Since MaterialNode
is exsiting one that work with single tuplestore, it might be sane to
modify this so that it accepts tuplestore from Query instead of its
child node.
2. Use temp table instead of tuplestore list. Since we agreed we need
to execute each plan one by one starting and shutting down executor,
it now looks very simple strategy.

I'm not familiar with the long discussion on this feature so not sure
they are possible, but ISTM  they are enough to be discussed (or
discussed already?).


Regards,


--
Hitoshi Harada


pgsql-hackers by date:

Previous
From: Thom Brown
Date:
Subject: Re: psql auto-completion for multiple where clauses
Next
From: Steve Atkins
Date:
Subject: Re: SHOW TABLES