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

Re: [RRR] top-level DML under CTEs

From: Hitoshi Harada <umi(dot)tanuki(at)gmail(dot)com>
To: Marko Tiikkaja <marko(dot)tiikkaja(at)cs(dot)helsinki(dot)fi>
Cc: pgsql-rrreviewers(at)postgresql(dot)org
Subject: Re: [RRR] top-level DML under CTEs
Date: 2010-10-03 13:47:28
Message-ID: AANLkTimG=XftAG_WV8SuT9YNJQHmzFAys0ZyYm5we9CR@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-rrreviewers
2010/10/1 Hitoshi Harada <umi(dot)tanuki(at)gmail(dot)com>:
> 2010/9/30 Marko Tiikkaja <marko(dot)tiikkaja(at)cs(dot)helsinki(dot)fi>:
>> On 2010-09-23 9:12 AM +0300, Hitoshi Harada wrote:
>>>
>>> Since the transformation of
>>> WITH clause to cheat postgres is in the parser stage currently, I
>>> wonder if this should be done in the rewriter or the planner stage.
>>
>> It's been about a week now.  Should we expect a new patch soon?
>>
>>
>
> Yep, I'm working it now. You'll see the conclusion in a day or so.

...and attached is the latest patch. It contains LIMIT etc. bug of
INSERT fixes and I confirmed the barrule case correctly in this
version.

> =# CREATE RULE barrule AS ON UPDATE TO bar DO INSTEAD
> -# WITH RECURSIVE t AS (SELECT -1)
> -# INSERT INTO bar
> -# WITH t AS (SELECT 1)
> -# VALUES((SELECT * FROM t));

Regards,


-- 
Hitoshi Harada

Attachment: toplevel-dml-cte.20101003.diff
Description: application/octet-stream (20.4 KB)

In response to

Responses

pgsql-hackers by date

Next:From: Peter GeogheganDate: 2010-10-03 13:53:34
Subject: Re: ISN patch that applies cleanly with git apply
Previous:From: Hitoshi HaradaDate: 2010-10-03 13:42:10
Subject: Re: INSERT ... VALUES... with ORDER BY / LIMIT

pgsql-rrreviewers by date

Next:From: Hitoshi HaradaDate: 2010-10-03 14:06:25
Subject: Re: wip: functions median and percentile
Previous:From: ๏̯͡๏ Guido BarosioDate: 2010-10-02 00:26:16
Subject: Re: Patch reviewers

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