作为这个问题的后续行动:
我尝试:
perform (with test_as_cte as(select * from myTable) select * from test_as_cte);
但是得到以下错误:
SQL Error [42601]: ERROR: subquery must return only one column Where: PL/pgSQL function inline_code_block line 9 at PERFORM
如果我在上面的代码中替换*
为myCol
没有错误。
但是,我需要使用 CTE 进行实际的性能测试并返回多个列。