Re: Backport "WITH ... AS MATERIALIZED" syntax to <12? - Mailing list pgsql-hackers

From Thomas Munro
Subject Re: Backport "WITH ... AS MATERIALIZED" syntax to <12?
Date
Msg-id CA+hUKGJL+CWc5Mw+FB3GTczOT3oZ8D1O9CA7uuB1codr+qZgkg@mail.gmail.com
Whole thread Raw
In response to Re: Backport "WITH ... AS MATERIALIZED" syntax to <12?  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
List pgsql-hackers
On Sat, Oct 19, 2019 at 11:52 PM Tomas Vondra
<tomas.vondra@2ndquadrant.com> wrote:
> I wonder if an extension could do something like that, though. It can
> install a hook after parse analysis, so I guess it could walk the CTEs
> and mark them as materialized.

I wonder if the existing pg_hint_plan extension could be extended to
do that using something like /*+ MATERIALIZE */.  That'd presumably be
ignored when not installed/not understood etc.  I've never used
pg_hint_plan myself and don't know how or how well it works, but it
look like it supports Oracle-style hints hidden in comments like /*+
HashJoin(a b) */ rather than SQL Server-style hints that are in the
SQL grammar itself like SELECT ... FROM a HASH JOIN b.



pgsql-hackers by date:

Previous
From: Noah Misch
Date:
Subject: Re: SimpleLruTruncate() mutual exclusion
Next
From: Michael Paquier
Date:
Subject: Re: [PATCH] Do not use StdRdOptions in Access Methods