|From:||Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>|
|To:||Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>|
|Cc:||Julien Rouhaud <rjuju123(at)gmail(dot)com>, PG Hackers <pgsql-hackers(at)postgresql(dot)org>, Hugo Mercier <hugo(dot)mercier(at)oslandia(dot)com>, Kevin Grittner <kgrittn(at)gmail(dot)com>|
|Subject:||Re: oversight in EphemeralNamedRelation support|
|Views:||Raw Message | Whole Thread | Download mbox|
Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com> writes:
> On Fri, Oct 13, 2017 at 10:01 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> But I see very
>> little case for allowing CTEs to capture such references, because surely
>> we are never going to allow that to do anything useful, and we have
>> several years of precedent now that they don't capture.
> For what it's worth, SQL Server allows DML in CTEs like us but went
> the other way on this. Not only are its CTEs in scope as DML targets,
> it actually lets you update them in cases where a view would be
> updatable, rewriting as base table updates. I'm not suggesting that
> we should do that too (unless of course it shows up in a future
> standard), just pointing it out as a curiosity.
Interesting. Still, given that we have quite a few years of precedent
that CTEs aren't in scope as DML targets, I'm disinclined to change
our semantics unless the point does show up in the standard.
I've not heard anyone speaking against the choices you made in your
prior message, so I'll go review your v3 patch, and push unless
I find problems.
regards, tom lane
|Next Message||Peter Eisentraut||2017-10-16 20:54:19||Re: coverage analysis improvements|
|Previous Message||Andres Freund||2017-10-16 20:19:56||Re: Aggregate FILTER option is broken in v10|