![]() v NAME=VALUE set psql variable NAME to VALUE f FILENAME execute commands from file, then exit c COMMAND run only single command (SQL or internal) and exit General options: -d DBNAME specify database name to connect to (default: "Marcello") To load the dump file use the psql program: If no database name is supplied, then the PGDATABASE environmentĮxample: pg_dump -username=postgres mertech -table=CHPROD -file=chprod.sql -inserts W, -password force password prompt (should happen automatically) U, -username=NAME connect as specified database user p, -port=PORT database server port number Use SESSION AUTHORIZATION commands instead ofĬonnection options: -h, -host=HOSTNAME database server host or socket directory X use-set-session-authorization, -use-set-session-authorization X disable-dollar-quoting, -disable-dollar-quotingĭisable dollar quoting, use SQL standard quotingĭisable triggers during data-only restore x, -no-privileges do not dump privileges (grant/revoke) t, -table=TABLE dump the named table only s, -schema-only dump only the schema, no data -S, -superuser=NAME specify the superuser user name to use in O, -no-owner skip restoration of object ownership n, -schema=SCHEMA dump the named schema only E, -encoding=ENCODING dump the data in encoding ENCODING D, -column-inserts dump data as INSERT commands with column names d, -inserts dump data as INSERT, rather than COPY, commands C, -create include commands to create database in dump ![]() ![]() c, -clean clean (drop) schema prior to create Options controlling the output content: -a, -data-only dump only the data, not the schema version output version information, then exit Z, -compress=0-9 compression level for compressed formats i, -ignore-version proceed even when server version mismatches F, -format=c|t|p output file format (custom, tar, plain text) General options: -f, -file=FILENAME output file name To Generate a Dump file use the pg_dump tool to create a dump file from a database/tables from a PostgreSQL database, pg_dump dumps a database as a text file or to other formats. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |