EXPLAIN ANALYZE 不适用于 ALTER TABLE

EXPLAIN ANALYZE not working with ALTER TABLE

我正在尝试更改 table 中的列类型,但我还想知道更改 table 需要多长时间。我因此合并:

EXPLAIN ANALYSE

命令为:

ALTER TABLE tbl_name ALTER COLUMN col_name TYPE new_type;

所以我做到了:

EXPLAIN ANALYSE ALTER TABLE my_table ALTER COLUMN my_column TYPE text;

但我收到错误:

ERROR:  syntax error at or near "ALTER"
LINE 1: EXPLAIN ANALYSE ALTER TABLE my_table ALTER COLUMN my_column...
                        ^

但是当我 EXPLAIN ANALYSESELECT 它没有问题。即:

EXPLAIN ANALYSE SELECT * FROM my_table LIMIT 300;

我一定是遗漏了一些非常简单的东西,但我没有看到它?

The manual for EXPLAIN:

Any SELECT, INSERT, UPDATE, DELETE, VALUES, EXECUTE, DECLARE, CREATE TABLE AS, or CREATE MATERIALIZED VIEW AS statement, whose execution plan you wish to see.

ALTER TABLE未覆盖