Is there a way to create a CTE with values in postgres?
I often just want to test out a function, or see what a variable might look like. This could be done by creating a temporary table, but I suspect that there is an easier way. Basically, WITH cte1 AS ( SELECT VALUES(1,2,3) AS temp_var1 , VALUES(4,5,6) AS temp_var2 ) SELECT temp_var1 , temp_var2 , (temp_var1 + temp_var2) AS temp_var3 FROM cte1 This would retur