This question is maybe noobish but i have not found direct answer for it.
How does with behave?
If i have
WITH tmp AS (...)
and then i use tmp 2 times in single query will tmp behave like macro in C or will it finish first time and rest in cache for next usage?