Wells Oliver <wells(dot)oliver(at)gmail(dot)com> writes:
> Out of curiosity, does the value of temp_buffers apply to how CTEs are
> generated under the hood?
No. Intermediate results within a query (whether CTE or not) might
get spilled to disk in a "temporary file", but that's a distinct
mechanism from temp tables, which is what temp_buffers applies to.
Bruce's nearby answer explains how you can control/monitor temp
files, but he didn't actually answer your question ;-)
regards, tom lane