Postgres can be used to export data from the Pg_dump database.
[1] Export only the database structure of all objects
C:\>pg_dump-f dddddd.sql-i-c-e utf8-n public-s-u portal-h localhost-w Portal
-I is for a compatible database version
-C includes statements to create a database
-e Setting the encoding of the exported data
-N is the name of the scheme
-U is the user name
-H is the name of the database server
-W is a strong Password Validation
-s only exports the database structure
The last parameter, of course, is the database name
[2] Export database structure and data for all objects
C:\>pg_dump-f dddddd.sql-i- C-E utf8-n public-u portal-h localhost-w Portal
No-s parameter
[3] Exports only all table data
C:\>pg_dump-f dddddd.sql-i- A-c-E utf8-n public-u portal-h localhost-w Portal
-A export data only
data import
[1]c:\psql-f dddddd.sql-h 192.168.1.2 33-u myuser-w myportal
Execution can be implemented by importing.
If the database myportal does not exist, create a database
Createdb-u postgres-h 192.168.1.233 myportal
and then execute the above import statement.
[2]psql-hlocalhost-u myuser-d myportal < Dddddd.sql
Executes the statement to import the data.