COPY
COPY is a SQL statement in the PostgreSQL Specific category. PostgreSQL high-speed bulk data import/export. Much faster than INSERT for large datasets. The syntax is COPY table_name FROM '/path/to/file' DELIMITER ',' CSV HEADER;. It returns copied rows count. A typical example: COPY employees FROM '/tmp/employees.csv' DELIMITER ',' CSV HEADER; -- Imports CSV with header row -- Export to CSV: COPY (SELECT name, salary FROM employees WHERE dept = 'IT') TO '/tmp/it_employees.csv' CSV HEADER; A close relative is SERIAL, which postgreSQL auto-increment type. Creates an INTEGER column with a sequence. Equivalent to AUTO_INCREMENT in MySQL. A close relative is RETURNING, which postgreSQL extension that returns values from INSERT/UPDATE/DELETE statements (like OUTPUT in SQL Server). A close relative is ARRAY, which postgreSQL supports array columns and array operations. Can be multi-dimensional. More about this category: PostgreSQL-specific features — SERIAL, RETURNING, ARRAY, JSONB, UPSERT. Related PostgreSQL Specific entries: SERIAL, RETURNING, ARRAY, JSONB, UPSERT (INSERT ON CONFLICT), ILIKE, BIGSERIAL / SMALLSERIAL, GENERATED AS IDENTITY.