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

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [8.4] Updated WITH clause patch (non-recursive)
Дата
Msg-id 25884.1201455401@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [8.4] Updated WITH clause patch (non-recursive)  (Neil Conway <neilc@samurai.com>)
Ответы Re: [8.4] Updated WITH clause patch (non-recursive)  (Neil Conway <neilc@samurai.com>)
Список pgsql-patches
Neil Conway <neilc@samurai.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

В списке pgsql-patches по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [8.4] Updated WITH clause patch (non-recursive)
Следующее
От: Neil Conway
Дата:
Сообщение: Re: [8.4] Updated WITH clause patch (non-recursive)