How to import CSV file data into a PostgreSQL table?

前端 未结 19 2296
再見小時候
再見小時候 2020-11-22 02:14

How can I write a stored procedure that imports data from a CSV file and populates the table?

相关标签:
19条回答
  • 2020-11-22 03:20

    I created a small tool that imports csv file into PostgreSQL super easy, just a command and it will create and populate the tables, unfortunately, at the moment all fields automatically created uses the type TEXT

    csv2pg users.csv -d ";" -H 192.168.99.100 -U postgres -B mydatabase
    

    The tool can be found on https://github.com/eduardonunesp/csv2pg

    0 讨论(0)
提交回复
热议问题