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

NAME

       pg_restore -  pg_dump  PostgreSQL

SYNOPSIS

       pg_restore [ option... ] [ filename ]

DESCRIPTION

       pg_restore  pg_dump(1)   PostgreSQL   pg_restore

       pg_restore    SQL   pg_dump   pg_dump

       pg_restore  " INSERT"  pg_restore  COPY

OPTIONS

       pg_restore

       filename

       -a

       --data-only

       -c

       --clean

       -C

       --create
                -d   CREATE DATABASE

       -d dbname

       --dbname=dbname
                dbname

       -f filename

       --file=filename
                -l

       -F format

       --format=format
               pg_restore

              t
                       tar  /

              c
                       pg_dump

       -i

       --ignore-version

       -I index

       --index=index

       -l

       --list
                -L

       -L list-file

       --use-list=list-file
                list-file   ';'

       -N

       --orig-order
                pg_dump   pg_dump     -r

       -o

       --oid-order
                OID   OID   -N -r

       -O

       --no-owner
                pg_restore  SET SESSION AUTHORIZATION    -O

       -P function-name(argtype [, ...])

       --function=function-name(argtype [, ...])

       -r

       --rearrange
                -N  -o

               -N, -o, -r pg_restore   list-file --  -L  -o  -r  pg_dump

       -R

       --no-reconnect

       -s

       --schema-only

       -S username

       --superuser=username
                 --disable-triggers

       -t table

       --table=table
               /

       -T trigger

       --trigger=trigger

       -v

       --verbose

       -x

       --no-privileges

       --no-acl
                ACL grant/revoke

       -X use-set-session-authorization

       --use-set-session-authorization
                pg_restore

       -X disable-triggers

       --disable-triggers
                pg_restore

                  --disable-triggers     -S    --use-set-session-authorization
              PostgreSQL   pg_restore

       pg_restore

       -h host

       --host=host
                 Unix   PGHOST   Unix

       -p port

       --port=port
                TCP  Unix   PGPORT

       -U username

       -W

ENVIRONMENT

       PGHOST

       PGPORT

       PGUSER

DIAGNOSTICS

        -d pg_restore  SQL  pg_restore   psql(1)

NOTES

        template1  pg_dump   template0template1

       CREATE DATABASE foo WITH TEMPLATE template0;

       pg_restore

       o
           --disable-triggers  pg_restore

       o pg_restore

         pg_dump(1)  pg_dump

         ANALYZE

EXAMPLES

         mydb tar

       $ pg_dump -Ft -b mydb > db.tar

         newdb BLOB

       $ pg_restore -d newdb db.tar

       $ pg_restore -l archive.file > archive.list

       ;
       ; Archive created at Fri Jul 28 22:28:36 2000
       ;     dbname: birds
       ;     TOC Entries: 74
       ;     Compression: 0
       ;     Dump Version: 1.4-0
       ;     Format: CUSTOM
       ;
       ;
       ; Selected TOC Entries:
       ;
       2; 145344 TABLE species postgres
       3; 145344 ACL species
       4; 145359 TABLE nt_header postgres
       5; 145359 ACL nt_header
       6; 145402 TABLE species_records postgres
       7; 145402 ACL species_records
       8; 145416 TABLE ss_old postgres
       9; 145416 ACL ss_old
       10; 145433 TABLE map_resolutions postgres
       11; 145433 ACL map_resolutions
       12; 145443 TABLE hs_old postgres
       13; 145443 ACL hs_old

         ID

        /

       10; 145433 TABLE map_resolutions postgres
       ;2; 145344 TABLE species postgres
       ;4; 145359 TABLE nt_header postgres
       6; 145402 TABLE species_records postgres
       ;8; 145416 TABLE ss_old postgres

         pg_restore  10  6

       $ pg_restore -L archive.list archive.file

HISTORY

       pg_restore  PostgreSQL 7.1

SEE ALSO

       pg_dump(1), pg_dumpall(1), psql(1)

       Postgresql  <laser@pgsqldb.org>