Re: [HACKERS] CTE inlining

Поиск
Список
Период
Сортировка
От Claudio Freire
Тема Re: [HACKERS] CTE inlining
Дата
Msg-id CAGTBQpZ46J1U+p6=_qpo_668vMiw1bvQVy6CzD=6oSMPPeFwOA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [HACKERS] CTE inlining  (David Fetter <david@fetter.org>)
Ответы Re: [HACKERS] CTE inlining  (David Fetter <david@fetter.org>)
Список pgsql-hackers
On Wed, May 3, 2017 at 11:31 AM, David Fetter <david@fetter.org> wrote:
> On Wed, May 03, 2017 at 11:26:27AM -0300, Claudio Freire wrote:
>> On Wed, May 3, 2017 at 2:19 AM, Craig Ringer <craig@2ndquadrant.com> wrote:
>> >> Or we will choose WITH MATERIALIZE, and then the users aware of
>> >> the fencing (and using the CTEs for that purpose) will have to
>> >> modify the queries. But does adding MATERIALIZE quality as major
>> >> query rewrite?
>> >
>> > Hardly.
>> >
>> >> Perhaps combining this with a GUC would be a solution. I mean, a
>> >> GUC specifying the default behavior, and then INLINE /
>> >> MATERIALIZE for individual CTEs in a query?
>> >
>> > It'd be nice if we could do that for a couple of releases as an
>> > interim measure, but people will then get locked into relying on
>> > it, and we'll never be able to remove it.
>>
>> The proposed guc seems like a good idea, without which ORMs that
>> support CTEs would be at a loss.
>
> Are you aware of such an ORM which both supports WITH and doesn't also
> closely track PostgreSQL development?  I'm not.
>
> Even assuming that such a thing exists, it's not at all obvious to me
> that we should be stalling and/or putting in what will turn out to be
> misfeatures to accommodate it.

I know SQLAlchemy does support CTEs, and lags quite considerably in
its support of the latest syntactic elements.

For instance, it took them 8 months to support the "skip locked" option.

Not sure whether that qualifies as "closely tracking" postgres for
you. Clearly they do track it, but that doesn't mean they're fast or
as fast as one would like/need.

Sure, that might not be enough to warrant the GUC. I would think so,
those are my 2 cents. YMMV.



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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: [HACKERS] Cost of src/test/recovery and .../subscription tests
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] Cost of src/test/recovery and .../subscription tests