Skip to navigation
How to import a csv file into a postgres table
09.11.16
how to import a csv file into a postgres table 1. login as root 2. login into postgres user # su - postgres 3. start psql # psql 4. switch to the dbfoo database # \c dbfoo 5. copy the things to the table tablebar # COPY public.tablebar FROM '/var/www/html/foo.csv' DELIMITER ',' CSV HEADER;
https://www.postgresql.org/docs/current/static/sql-copy.html
Reply
Anonymous
Information Epoch 1769263144
Think hierarchically.
Home
Notebook
Contact us