https://www.postgresql.org/docs/current/sql-explain.html >>> Any SELECT, INSERT, UPDATE, DELETE, MERGE, VALUES, EXECUTE, DECLARE, CREATE TABLE AS, or CREATE MATERIALIZED VIEW AS statement, whose execution plan you wish to see. >>>
seems you can use it with SELECT INTO.
explain (ANALYZE, BUFFERS, TIMING, VERBOSE ON, BUFFERS ON, WAL ON,SETTINGS ON) select count(*) as cnt INTO s from tenk1;
We try not to encourage such things. And CTAS is listed.