Re: [8.4] Updated WITH clause patch (non-recursive)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Neil Conway <neilc(at)samurai(dot)com>
Cc: Gregory Stark <stark(at)enterprisedb(dot)com>, pgsql-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: [8.4] Updated WITH clause patch (non-recursive)
Date: 2008-01-27 17:36:41
Message-ID: 25884.1201455401@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Neil Conway <neilc(at)samurai(dot)com> writes:
> (1) This is SQL-standard syntax (and not even wacko syntax, at that!),
> and there is merit in implementing it on those grounds alone.
> (2) It is supported by DB2, MS SQL and Oracle, so there is a further
> compatibility argument to be made.

Both of the above arguments hold water only if we implement compatible
*semantics*, not merely syntax, so I find them unconvincing at this
stage.

> (3) It avoids the need to repeat subqueries multiple times in the main
> query, which can make queries more concise. Defining subqueries outside
> the main SELECT body can also have readability advantages.

Views fix that too.

>> If it doesn't provide any additional expressive capabilities then I
>> think he didn't like taking "with" as a reserved word.

> If we're going to implement recursive queries eventually (which we
> almost surely will, whether in 8.4 or a future release), we'll need to
> make WITH more reserved at some point anyway, so I don't see much to be
> gained in the long run by delaying it.

The point is that when you break people's apps you'll be able to point
to some real increment in functionality to justify it. With the patch
as it stands you'd essentially be saying "we're going to cause you pain
now for benefit later", which is a hard selling proposition.

I'm not opposed to applying this patch if it's an incremental step along
a clearly defined path to full WITH support in 8.4. I'm less eager to
put it in if there's not a plan and a commitment to make that happen.

regards, tom lane

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Neil Conway 2008-01-27 19:13:02 Re: [8.4] Updated WITH clause patch (non-recursive)
Previous Message Tom Lane 2008-01-27 17:27:34 Re: [8.4] Updated WITH clause patch (non-recursive)