Re: "writable CTEs" - Mailing list pgsql-hackers

From David Fetter
Subject Re: "writable CTEs"
Date
Msg-id 20101228173105.GH25421@fetter.org
Whole thread Raw
In response to Re: "writable CTEs"  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: "writable CTEs"
List pgsql-hackers
On Tue, Dec 28, 2010 at 04:35:26PM +0200, Peter Eisentraut wrote:
> On tis, 2010-12-28 at 00:19 +0000, Peter Geoghegan wrote:
> > It's worth noting that officially (i.e. in the docs), we don't even
> > call CTEs CTEs at any point. We call them WITH queries. I think that
> > that's a mistake because we call them CTEs everywhere else.
> 
> I think "WITH query" or "WITH clause" is more understandable than CTE,
> which to me is a term that has no relationship with anything else.

Common Table Expression, or CTE for short, is the standard
terminology, and I don't just mean SQL:2008.  It's standard in DB2,
Drizzle, Firebird, HSQLDB, Informix, Microsoft SQL Server, Oracle, and
Sybase SQL Anywhere, at a minimum.

"WITH query" is a pure PostgreSQL invention, and not a super helpful
one to the vast majority of users.  Please bear in mind that if this
is to remain a successful project, the vast majority of users are
*future* users, not current or past ones.  We don't talk about
"Subquery queries" or "FULL JOIN queries" and give them their own doc
section, nor should we.  We should instead refactor the docs to point
to CTEs in the appropriate places, and it's my hope that those places
will increase over time.

Cheers,
David.
-- 
David Fetter <david@fetter.org> http://fetter.org/
Phone: +1 415 235 3778  AIM: dfetter666  Yahoo!: dfetter
Skype: davidfetter      XMPP: david.fetter@gmail.com
iCal: webcal://www.tripit.com/feed/ical/people/david74/tripit.ics

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate


pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: pg_dump --split patch
Next
From: Tom Lane
Date:
Subject: Re: pg_dump --split patch