4 ms·
Per the PostgreSQL email list discussion on the subject: 1. The standards define CTE's as being stable within a statement. I.e. they don't change as the quer
by einhverfr 13y ago
Per the PostgreSQL email list discussion on the subject:
1. The standards define CTE's as being stable within a statement. I.e. they don't change as the query progresses.
2. The way this is implemented in PostgreSQL currently is to have CTE's as optimization fences.
Presumably some cross-CTE optimization may be added in the future but in usual cases, will be slowly added with a lot of care.