Re: Using results from INSERT ... RETURNING

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Marko Tiikkaja <marko(dot)tiikkaja(at)cs(dot)helsinki(dot)fi>, PostgreSQL hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Using results from INSERT ... RETURNING
Date: 2009-10-04 15:47:19
Message-ID: 9418.1254671239@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> Well, I think a patch to implement writeable CTEs is probably going to
> have to handle this case - I don't think we can just ignore rewrite
> rules when processing a CTE. But it does seem to be beyond the scope
> of the current patch.

I hadn't been paying too much attention to this thread, but ... why
is anyone worrying about that? Rewrite rules are not the concern
of either the planner or the executor. A "do also" rule will result
in two entirely separate Query trees, which will each be planned
separately and executed separately. Any given executor run only
has to think about one type of DML command --- otherwise the executor
would be broken already, since it takes only one command-type argument.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Marko Tiikkaja 2009-10-04 16:24:41 Re: Using results from INSERT ... RETURNING
Previous Message Tom Lane 2009-10-04 15:10:10 Re: taking a stab at agg(foo ORDER BY bar)