Skip site navigation (1) Skip section navigation (2)

Re: Writeable CTEs patch

From: Marko Tiikkaja <marko(dot)tiikkaja(at)cs(dot)helsinki(dot)fi>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Writeable CTEs patch
Date: 2010-02-10 14:42:16
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
On 2010-02-08 18:42 +0200, Robert Haas wrote:
> On Thu, Feb 4, 2010 at 11:57 AM, Marko Tiikkaja
> <marko(dot)tiikkaja(at)cs(dot)helsinki(dot)fi> wrote:
>> On 2010-02-04 18:04 UTC+2, I wrote:
>>> While working on the docs, I noticed one problem with the patch itself:
>>> it doesn't handle multi-statement DO INSTEAD rules correctly.  I'm going
>>> to submit a fix for that later.
>> Here's an updated patch.  Only changes from the previous patch are
>> fixing the above issue and a regression test for it.
> - It appears that we pull out all of the DML statements first and run
> them in order, but I'm not sure that's the right thing to do.
> Consider:
> WITH x AS (INSERT ...), y AS (SELECT ...), z AS (INSERT ...) SELECT ...
> I would assume we would do x, CCI, do y, do z, CCI, do main query, but
> I don't think that's what this implements.  The user might be
> surprised to find out that y sees the effects of z.

I've updated the patch according to what I said here:

I haven't done any extensive testing, but it seems to work in the most
common cases.

Marko Tiikkaja

Attachment: dmlwith10.patch
Description: text/plain (63.1 KB)

In response to

pgsql-hackers by date

Next:From: Marko TiikkajaDate: 2010-02-10 14:42:38
Subject: Re: Writeable CTEs patch
Previous:From: Robert HaasDate: 2010-02-10 14:27:42
Subject: Re: Some belated patch review for "Buffers" explain analyze patch

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group