I trying to perform something like
CREATE TEMP TABLE tblname AS (
INSERT INTO tbl2 FROM SELECT(1,1) RETURNING a,b
);
but i've got ERROR: syntax error at or near "INSERT";
Is it possible to combine CREATE TABLE AS SELECT and INSERT FROM SELECT RETURNING clauses?
select
statement for acreate table as
in parentheses. – Reiko