PG database table interface and data export

Source: Internet
Author: User

Export command

- - 5432 - -- inserts-t human_info > D:\human_info_backup.sql testdb

Command description

Pg_dump: is the backup command that comes with the PG database, and in the bin directory, all execution must be performed in the bin directory.

- H: Specify the host address, which is the server of the PG database, the host address specified here is localhost

- P: Specify the host port, is the port of the PG database application, the default port is used here, the default seems to be without writing.

- u: Specifies the user name, which is the user name of the login database, the default user name of PG Postgres

--inserts: This parameter specifies that the exported result is an INSERT statement of the SQL file, but without a field INSERT statement, if you want to bring a field can be written--column-inserts

- T: Specifies the name of the table to export, where the HUMAN_INFO table structure and data are exported

> D:\human_info_backup.sql This statement specifies the path and file name to export

Finally, specify the name of the DB instance to export TestDB

PG database table interface and data export

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.