Re: Status report on writeable CTEs

From: Marko Tiikkaja <marko(dot)tiikkaja(at)cs(dot)helsinki(dot)fi>
To: Hitoshi Harada <umi(dot)tanuki(at)gmail(dot)com>
Cc: David Fetter <david(at)fetter(dot)org>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Status report on writeable CTEs
Date: 2010-08-03 17:54:39
Message-ID: 4C5857DF.4000801@cs.helsinki.fi
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 8/3/2010 7:30 PM, Hitoshi Harada wrote:
> As hackers say, the first to try should be Marko's first design that
> use the list of tuplestore and DTScanNode. So if he has solid image to
> reach there, we can wait for him to complete his first compilable
> version. Then let's take it back and forth. Is it possible?

I am currently working on a version that treats all WITH queries like
wCTEs. My progress can be seen in my git repo [1], branch "wcte". In
its current form, the patch compiles and passes all applicable
regression tests but it's still very messy. I'm going to send a cleaner
WIP patch to the list the minute I have one, but anyone's free to look
at the git repo (and even work on it if they want!).

> And I concern we might not have concrete consensus about list of
> features in document form. Does it accept Recursive query? What if x
> refers to y that refers to x cyclicly? An external design sometimes
> fix the internal design, and it helps people to review the
> implementation. If I missed something please point me to the link.

A recursive query should be fine as long as 1) it's SELECT-only and 2)
it doesn't loop forever. A wCTE can of course refer to the result of
the recursive SELECT query with INSERT .. SELECT, UPDATE .. FROM or
DELETE .. USING. Cyclic dependencies are out of the scope of this
patch; I'm not planning on adding any new features to regular CTEs.

[1] http://git.postgresql.org/gitweb?p=users/johto/postgres.git;a=summary

Regards,
Marko Tiikkaja

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2010-08-03 17:57:14 Re: review: xml_is_well_formed
Previous Message Kolb, Harald (NSN - DE/Munich) 2010-08-03 17:50:32 Review of Synchronous Replication patches