Alternately, the PostgreSQL COPY command can be used to load a WKT file into a database. After creating the table, execute the COPY command with the HEADER option in order to import data. This provides a straightforward way of integrating WKT data in a PostgreSQL database:
COPY geometry_data (wkt) FROM '/path/to/data/csv' DELIMITER ',' CSV HEADER;