COPY is PostgreSQL's high-performance command for bulk loading and exporting data — moving large amounts of data between a file (or stream) and a table far faster than individual INSERT statements. It's the standard tool for importing/exporting big datasets.
COPY for fast bulk loading
users (name, email, age) (FORMAT csv, HEADER );
users (FORMAT csv, HEADER );
\ users (FORMAT csv, HEADER )
