Re: [HACKERS] "writable CTEs"

2011-01-05 Thread Peter Geoghegan
Hello, I have added my common table expressions docpatch to the 2011-01 commitfest: https://commitfest.postgresql.org/action/patch_view?id=476 I think that we need to get this resolved. -- Regards, Peter Geoghegan -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make

Re: [HACKERS] "writable CTEs"

2010-12-29 Thread Martijn van Oosterhout
On Tue, Dec 28, 2010 at 07:09:14AM -0500, Robert Haas wrote: > On Tue, Dec 28, 2010 at 12:45 AM, David Fetter wrote: > > I don't see how people can be relying on links to 9.1-to-be's > > documentation. > > Well, it's always handy when the filenames are the same across > versions. Ever looked at

Re: [HACKERS] "writable CTEs"

2010-12-29 Thread David Fetter
On Tue, Dec 28, 2010 at 11:07:59PM +, Peter Geoghegan wrote: > On 28 December 2010 20:07, Peter Eisentraut wrote: > > The phrase "common table expression" does not appear anywhere in the SQL > > standard.  The standard uses the grammar symbol . > > I think we're losing sight of the issue a bi

Re: [HACKERS] "writable CTEs"

2010-12-29 Thread Robert Haas
On Wed, Dec 29, 2010 at 4:19 AM, Yeb Havinga wrote: > Also, the terms CTE and CTEScan appear in EXPLAIN output, it would be nice > to have a meaningful hit when looking for the term in the documentation > page, instead of 'Your search for cte returned no hits.' This is an excellent point. -- Ro

Re: [HACKERS] "writable CTEs"

2010-12-29 Thread Yeb Havinga
On 2010-12-29 09:16, Mark Kirkwood wrote: On 29/12/10 03:35, Peter Eisentraut wrote: On tis, 2010-12-28 at 00:19 +, 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 mistak

Re: [HACKERS] "writable CTEs"

2010-12-29 Thread Mark Kirkwood
On 29/12/10 03:35, Peter Eisentraut wrote: On tis, 2010-12-28 at 00:19 +, 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

Re: [HACKERS] "writable CTEs"

2010-12-28 Thread Peter Geoghegan
On 28 December 2010 20:07, Peter Eisentraut wrote: > The phrase "common table expression" does not appear anywhere in the SQL > standard.  The standard uses the grammar symbol . I think we're losing sight of the issue a bit here. No one is proposing that we call WITH queries common table express

Re: [HACKERS] "writable CTEs"

2010-12-28 Thread Peter Eisentraut
On tis, 2010-12-28 at 09:31 -0800, David Fetter wrote: > 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. >

Re: [HACKERS] "writable CTEs"

2010-12-28 Thread Peter Eisentraut
On tis, 2010-12-28 at 16:04 +, Peter Geoghegan wrote: > If I search for "common table expressions" on Wikipedia, I am sent to > the common table expressions article, without any re-direction. The > article doesn't mention "with query" as a synonym of CTE at any point. > If I search for "With qu

Re: [HACKERS] "writable CTEs"

2010-12-28 Thread David Fetter
On Tue, Dec 28, 2010 at 04:35:26PM +0200, Peter Eisentraut wrote: > On tis, 2010-12-28 at 00:19 +, 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

Re: [HACKERS] "writable CTEs"

2010-12-28 Thread Peter Geoghegan
On 28 December 2010 14:53, Tom Lane wrote: > I'm with Peter on that.  CTE is a completely meaningless term to most > users. I don't believe that that's the case. If CTE is a completely meaningless term to most users, WITH query is even more meaningless. I never refer to WITH queries in conversati

Re: [HACKERS] "writable CTEs"

2010-12-28 Thread Tom Lane
Peter Eisentraut writes: > On tis, 2010-12-28 at 00:19 +, 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 th

Re: [HACKERS] "writable CTEs"

2010-12-28 Thread Peter Eisentraut
On tis, 2010-12-28 at 00:19 +, 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"

Re: [HACKERS] "writable CTEs"

2010-12-28 Thread Peter Geoghegan
On 28 December 2010 12:09, Robert Haas wrote: > On Tue, Dec 28, 2010 at 12:45 AM, David Fetter wrote: >> I don't see how people can be relying on links to 9.1-to-be's >> documentation. > > Well, it's always handy when the filenames are the same across > versions.  Ever looked at the 9.0 documenta

Re: [HACKERS] "writable CTEs"

2010-12-28 Thread Alvaro Herrera
Excerpts from David Fetter's message of mar dic 28 02:45:11 -0300 2010: > On Tue, Dec 28, 2010 at 03:49:16AM +, Peter Geoghegan wrote: > > Attached documentation patch should make things clearer. I haven't > > changed the "queries-with" section to > > "queries-common-table-expression" per Davi

Re: [HACKERS] "writable CTEs"

2010-12-28 Thread Robert Haas
On Tue, Dec 28, 2010 at 12:45 AM, David Fetter wrote: > I don't see how people can be relying on links to 9.1-to-be's > documentation. Well, it's always handy when the filenames are the same across versions. Ever looked at the 9.0 documentation for something and then modified the URL to see what

Re: [HACKERS] "writable CTEs"

2010-12-27 Thread David Fetter
On Tue, Dec 28, 2010 at 03:49:16AM +, Peter Geoghegan wrote: > On 28 December 2010 01:09, Kevin Grittner wrote: > > Personally, I think it's worth fixing.  This sort of disjunction > > between code and documentation can cause confusing for someone > > trying to get started on hacking.  It is a

Re: [HACKERS] "writable CTEs"

2010-12-27 Thread Peter Geoghegan
On 28 December 2010 01:09, Kevin Grittner wrote: > Personally, I think it's worth fixing.  This sort of disjunction > between code and documentation can cause confusing for someone > trying to get started on hacking.  It is an exception to the > otherwise excellent documentation of both the produc

Re: [HACKERS] "writable CTEs"

2010-12-27 Thread David Fetter
On Mon, Dec 27, 2010 at 09:51:01PM -0500, Robert Haas wrote: > On Mon, Dec 27, 2010 at 9:28 PM, David Fetter wrote: > > On Tue, Dec 28, 2010 at 12:19:47AM +, 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 cal

Re: [HACKERS] "writable CTEs"

2010-12-27 Thread Robert Haas
On Mon, Dec 27, 2010 at 9:28 PM, David Fetter wrote: > On Tue, Dec 28, 2010 at 12:19:47AM +, 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

Re: [HACKERS] "writable CTEs"

2010-12-27 Thread David Fetter
On Tue, Dec 28, 2010 at 12:19:47AM +, 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. Agreed. > Is there interest i

Re: [HACKERS] "writable CTEs"

2010-12-27 Thread Kevin Grittner
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. > > Is there interest in correcting this, by putting "CTEs" or "Commo

Re: [HACKERS] "writable CTEs"

2010-12-27 Thread Peter Geoghegan
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. Is there interest in correcting this, by putting "CTEs" or "Common table expressions" in parenthesis

Re: [HACKERS] "writable CTEs"

2010-12-27 Thread David Fetter
On Mon, Dec 27, 2010 at 11:47:14PM +0200, Peter Eisentraut wrote: > On ons, 2010-12-22 at 20:44 +0200, Marko Tiikkaja wrote: > > On 2010-12-22 8:28 PM, Peter Eisentraut wrote: > > > As a side note, I think the term "writable CTE" is a misnomer. The CTE > > > is not writable. The CTE is the result

Re: [HACKERS] "writable CTEs"

2010-12-27 Thread Peter Eisentraut
On ons, 2010-12-22 at 20:44 +0200, Marko Tiikkaja wrote: > On 2010-12-22 8:28 PM, Peter Eisentraut wrote: > > As a side note, I think the term "writable CTE" is a misnomer. The CTE > > is not writable. The CTE is the result of a write operation. > > > > A writable CTE would look like this: > > >

Re: [HACKERS] "writable CTEs"

2010-12-22 Thread David Fetter
On Wed, Dec 22, 2010 at 12:54:39PM -0600, Kevin Grittner wrote: > Marko Tiikkaja wrote: > > > I think I've used "DML WITH" in the patch, but I don't like that > > either. Naming this feature seems to be quite a challenge. > > > > I'd prefer something short but easily understandable, but those

Re: [HACKERS] "writable CTEs"

2010-12-22 Thread Kevin Grittner
Marko Tiikkaja wrote: > I think I've used "DML WITH" in the patch, but I don't like that > either. Naming this feature seems to be quite a challenge. > > I'd prefer something short but easily understandable, but those > two might be mutually exclusive. How about?: DML CTEs DML-based CTEs R

Re: [HACKERS] "writable CTEs"

2010-12-22 Thread Richard Broersma
On Wed, Dec 22, 2010 at 10:44 AM, Marko Tiikkaja wrote: > I'd prefer something short but easily understandable, but those two might be > mutually exclusive. Volatile CTE's doesn't add any more clarity either. Maybe "Round Trip Reduction" CTE's. :) -- Regards, Richard Broersma Jr. -- Sent via

Re: [HACKERS] "writable CTEs"

2010-12-22 Thread Marko Tiikkaja
On 2010-12-22 8:28 PM, Peter Eisentraut wrote: As a side note, I think the term "writable CTE" is a misnomer. The CTE is not writable. The CTE is the result of a write operation. A writable CTE would look like this: WITH foo AS (SELECT ...) UPDATE foo SET ... a bit like an updatable view. A

[HACKERS] "writable CTEs"

2010-12-22 Thread Peter Eisentraut
As a side note, I think the term "writable CTE" is a misnomer. The CTE is not writable. The CTE is the result of a write operation. A writable CTE would look like this: WITH foo AS (SELECT ...) UPDATE foo SET ... a bit like an updatable view. AFAICT, the current patch doesn't use the term, so