Re: "writable CTEs"

From: Peter Geoghegan <peter(dot)geoghegan86(at)gmail(dot)com>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: David Fetter <david(at)fetter(dot)org>, Marko Tiikkaja <marko(dot)tiikkaja(at)cs(dot)helsinki(dot)fi>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: "writable CTEs"
Date: 2010-12-28 23:07:59
Message-ID: AANLkTik84hRR-Rc0dej7pU4VrfcY=Fdyx-=AaPBejd7W@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 28 December 2010 20:07, Peter Eisentraut <peter_e(at)gmx(dot)net> wrote:
> The phrase "common table expression" does not appear anywhere in the SQL
> standard.  The standard uses the grammar symbol <with clause>.

I think we're losing sight of the issue a bit here.

No one is proposing that we call WITH queries common table
expressions. As I think we all agree, the term "WITH query" and
"common table expression" are not synonymous. A WITH query is
comprised of one or more common table expressions, plus a conventional
SELECT query.

All that I'm asking is that we /specify/ that the "subqueries" already
mentioned in the docs are common table expressions. This terminology
is less confusing and ambiguous, is demonstrably already in widespread
use, and will probably lay the groundwork for whatever name we choose
for wCTEs.

I think that it makes sense to change the title of the relevant
section from "WITH Queries" to "WITH Queries (Common Table
Expressions)" because CTEs are the defining characteristic of WITH
queries, and, as I've said, the term "common table expression" has
mindshare in a way that "WITH query" clearly doesn't.

--
Regards,
Peter Geoghegan

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Joel Jacobson 2010-12-28 23:24:37 Re: pg_dump --split patch
Previous Message David Wilson 2010-12-28 23:00:46 Re: pg_dump --split patch