0

I am new to PostgreSQL and have some questions.

  1. What is the best way to import/export tables with PostgreSQL? I know .csv is one way, but are there any easier methods?

  2. Let's say I have created a data model in Excel, with many tables and relationships... Can I import that data model directly into PostgreSQL? I am also wondering about this for MySQL as well.

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
J. Chan
  • 71
  • 1
  • 1
  • 5

2 Answers2

1

There is a native way for export/import in psql utility - COPY function:

Import Excel Data into PostgreSQL 9.3

Export Postgres table to CSV file with headings

Also, you can use pg_dump to export data in SQL format as Tommasso said.

Community
  • 1
  • 1
smyatkin_max
  • 365
  • 2
  • 10
0

1) The "native" Postgres method is using pg_dump / pg_restore:

2) No, there is not native methods. Maybe with external tools

Tom-db
  • 6,528
  • 3
  • 30
  • 44