Provided by: manpages-zh_1.5.2-1_all bug

NAME

       pg_dump - PostgreSQL

SYNOPSIS

       pg_dump [ option... ] [ dbname ]

DESCRIPTION

       pg_dump  PostgreSQL   pg_dump

          SQL   SQL   psql(1)   SQL

         pg_restore(1)   pg_restore(1)

          pg_restore(1)  pg_dump pg_dump   pg_restore /  ``custom()'' -Fc  tar
       -Ft  tar

         pg_dump

OPTIONS


       dbname
                 PGDATABASE

       -a

       --data-only

                pg_restore

       -b

       --blobs

       -c

       --clean

                pg_restore

       -C

       --create

                pg_restore

       -d

       --inserts
                INSERT  COPY  SQL

       -D

       --column-inserts

       --attribute-inserts
                INSERT  INSERT INTO table(column, ...) VALUES ...

       -f file

       --file=file

       -F format

       --format=format
               format

              p
                      SQL

              t
                       pg_restore  tar /

              c
                       pg_restore

       -i

       --ignore-version
                pg_dump

              pg_dump PostgreSQL   7.0   pg_dump

       -n namespace

       --schema=schema
                schema

              Note: :  pg_dump

       -o

       --oids
               OID OID

       -O

       --no-owner
                 By  default,  pg_dump  issues   SET   SESSION   AUTHORIZATION
              statements  to  set ownership of created schema elements.  These
              statements will fail when the script is run unless it is started
              by a superuser (or the same user that owns all of the objects in
              the script).  To make a script that can be restored by any user,
              but  will  give  that user ownership of all the objects, specify
              -O.

                pg_restore

       -R

       --no-reconnect

       -s

       --schema-only

       -S username

       --superuser=username
                 --disable-triggers

       -t table

       --table=table
                table    --schema  --table

              Note:
               :  pg_dump

       -v

       --verbose
                 pg_dump

       -x

       --no-privileges

       --no-acl
                ACL/

       -X use-set-session-authorization

       --use-set-session-authorization
                pg_dump

       -X disable-triggers

       --disable-triggers
                pg_dump

                --disable-triggers   -S

                pg_restore

       -Z 0..9

       --compress=0..9

       -h host

       --host=host
                 Unix   PGHOST  Unix

       -p port

       --port=port
                TCP  Unix   PGPORT

       -U username

       -W

ENVIRONMENT

       PGDATABASE

       PGHOST

       PGPORT

       PGUSER

DIAGNOSTICS

       pg_dump  SELECT  pg_dump   psql(1)

NOTES

        template1  pg_dump   template0template1

       CREATE DATABASE foo WITH TEMPLATE template0;

       pg_dump

       o
          pg_dump

       o
           --disable-triggers  pg_dump

        tar  8 GB tar   tar

         ANALYZE

EXAMPLES


       $ pg_dump mydb > db.out

       $ psql -d database -f db.out

         mydb BLOB   tar

       $ pg_dump -Ft -b mydb > db.tar

        BLOB newdb

       $ pg_restore -d newdb db.tar

HISTORY

       pg_dump  Postgres95  0.02  PostgreSQL  7.1

SEE ALSO

       pg_dumpall(1), pg_restore(1), psql(1)

       Postgresql  <laser@pgsqldb.org>