As a follow-up to this question:
I try:
perform (with test_as_cte as(select * from myTable) select * from test_as_cte);
But get the following error:
SQL Error [42601]: ERROR: subquery must return only one column Where: PL/pgSQL function inline_code_block line 9 at PERFORM
If I replace *
with myCol
in the above code there is no error.
However, I need to do realistic performance testing with the CTE and return multiple columns.