How To Create Temp Table After Cte In Postgres