postgres=# create table demo(id int generated always as identity primary key, data text);
CREATE TABLE
postgres=# insert into demo(data) values ('bla');
INSERT 0 1
postgres=# insert into demo(data) values ('fasel');
INSERT 0 1
postgres=# \copy demo to 'demo.csv' with (header true);
COPY 2
postgres=# truncate demo;
TRUNCATE TABLE
postgres=# \copy demo from 'demo.csv' with (header false);
ERROR: invalid input syntax for type integer: "id"
CONTEXT: COPY demo, line 1, column id: "id"
postgres=#