CSV into Postgres
copy existing_table from '/home/user/cooldata.csv' with (format csv, header);
The table should already be there, and yes, that path needs to be absolute. This is for csv with a header row. Drop the header
part if you don't have one.
Written by Cathy Wise
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Postgres
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#