head	1.7;
access;
symbols
	REL9_0_0:1.7
	REL9_1_ALPHA1:1.7
	REL9_0_RC1:1.7
	REL9_0_BETA4:1.7
	REL9_0_STABLE:1.7.0.14
	REL9_0_BETA3:1.7
	REL9_0_BETA2:1.7
	REL7_4_29:1.5
	REL8_0_25:1.5
	REL8_1_21:1.6
	REL8_2_17:1.6
	REL8_3_11:1.6
	REL8_4_4:1.7
	REL9_0_BETA1:1.7
	REL9_0_ALPHA5_BRANCH:1.7.0.12
	REL9_0_ALPHA5:1.7
	REL7_4_28:1.5
	REL8_0_24:1.5
	REL8_1_20:1.6
	REL8_2_16:1.6
	REL8_3_10:1.6
	REL8_4_3:1.7
	REL9_0_ALPHA4:1.7
	REL9_0_ALPHA4_BRANCH:1.7.0.10
	REL8_5_ALPHA3:1.7
	REL8_5_ALPHA3_BRANCH:1.7.0.8
	REL7_4_27:1.5
	REL8_0_23:1.5
	REL8_1_19:1.6
	REL8_2_15:1.6
	REL8_3_9:1.6
	REL8_4_2:1.7
	REL8_5_ALPHA2:1.7
	REL8_5_ALPHA2_BRANCH:1.7.0.6
	REL7_4_26:1.5
	REL8_0_22:1.5
	REL8_1_18:1.6
	REL8_2_14:1.6
	REL8_3_8:1.6
	REL8_4_1:1.7
	REL8_5_ALPHA1:1.7
	REL8_5_ALPHA1_BRANCH:1.7.0.4
	REL8_4_STABLE:1.7.0.2
	REL8_4_0:1.7
	REL8_4_RC2:1.7
	REL8_4_RC1:1.7
	REL8_4_BETA2:1.7
	REL8_4_BETA1:1.7
	REL7_4_25:1.5
	REL8_0_21:1.5
	REL8_1_17:1.6
	REL8_2_13:1.6
	REL8_3_7:1.6
	REL7_4_24:1.5
	REL8_0_20:1.5
	REL8_1_16:1.6
	REL8_2_12:1.6
	REL8_3_6:1.6
	REL7_4_23:1.5
	REL8_0_19:1.5
	REL8_1_15:1.6
	REL8_2_11:1.6
	REL8_3_5:1.6
	REL7_4_22:1.5
	REL8_0_18:1.5
	REL8_1_14:1.6
	REL8_2_10:1.6
	REL8_3_4:1.6
	REL7_4_21:1.5
	REL8_0_17:1.5
	REL8_1_13:1.6
	REL8_2_9:1.6
	REL8_3_3:1.6
	REL7_4_20:1.5
	REL8_0_16:1.5
	REL8_1_12:1.6
	REL8_2_8:1.6
	REL8_3_2:1.6
	REL8_2_7:1.6
	REL8_3_1:1.6
	REL8_3_STABLE:1.6.0.6
	REL8_3_0:1.6
	REL8_3_RC2:1.6
	REL7_3_21:1.5
	REL7_4_19:1.5
	REL8_0_15:1.5
	REL8_1_11:1.6
	REL8_2_6:1.6
	REL8_3_RC1:1.6
	REL8_3_BETA4:1.6
	REL8_3_BETA3:1.6
	REL8_3_BETA2:1.6
	REL8_3_BETA1:1.6
	REL7_3_20:1.5
	REL7_4_18:1.5
	REL8_0_14:1.5
	REL8_1_10:1.6
	REL8_2_5:1.6
	REL7_3_19:1.5
	REL7_4_17:1.5
	REL8_0_13:1.5
	REL8_1_9:1.6
	REL8_2_4:1.6
	REL8_0_12:1.5
	REL8_1_8:1.6
	REL8_2_3:1.6
	REL7_3_18:1.5
	REL7_4_16:1.5
	REL8_0_11:1.5
	REL8_1_7:1.6
	REL8_2_2:1.6
	REL8_0_10:1.5
	REL8_1_6:1.6
	REL8_2_1:1.6
	REL7_4_15:1.5
	REL7_3_17:1.5
	REL8_2_STABLE:1.6.0.4
	REL8_2_0:1.6
	REL8_2_RC1:1.6
	REL8_2_BETA3:1.6
	REL8_2_BETA2:1.6
	REL8_1_5:1.6
	REL8_0_9:1.5
	REL7_4_14:1.5
	REL7_3_16:1.5
	REL8_2_BETA1:1.6
	REL7_3_15:1.5
	REL7_4_13:1.5
	REL8_0_8:1.5
	REL8_1_4:1.6
	REL7_3_14:1.5
	REL7_4_12:1.5
	REL8_0_7:1.5
	REL8_1_3:1.6
	REL7_3_13:1.5
	REL7_4_11:1.5
	REL8_0_6:1.5
	REL8_1_2:1.6
	REL7_3_12:1.5
	REL7_4_10:1.5
	REL8_0_5:1.5
	REL8_1_1:1.6
	REL8_1_STABLE:1.6.0.2
	REL8_1_0:1.6
	REL8_1_0RC1:1.6
	REL8_1_0BETA4:1.6
	REL8_1_0BETA3:1.6
	REL7_3_11:1.5
	REL7_4_9:1.5
	REL8_0_4:1.5
	REL8_1_0BETA2:1.6
	REL8_1_0BETA1:1.6
	REL7_2_8:1.5
	REL7_3_10:1.5
	REL7_4_8:1.5
	REL8_0_3:1.5
	REL8_0_2:1.5
	REL7_2_7:1.5
	REL7_3_9:1.5
	REL7_4_7:1.5
	REL8_0_1:1.5
	REL8_0_STABLE:1.5.0.14
	REL8_0_0:1.5.0.12
	REL8_0_0RC5:1.5
	REL8_0_0RC4:1.5
	REL8_0_0RC3:1.5
	REL8_0_0RC2:1.5
	REL8_0_0RC1:1.5
	REL8_0_0BETA5:1.5
	REL8_0_0BETA4:1.5
	REL7_4_6:1.5
	REL7_3_8:1.5
	REL7_2_6:1.5
	REL8_0_0BETA3:1.5
	REL8_0_0BETA2:1.5
	REL7_2_5:1.5
	REL7_4_5:1.5
	REL7_3_7:1.5
	REL7_4_4:1.5
	REL8_0_0BETA1:1.5
	REL7_4_3:1.5
	REL7_4_2:1.5
	REL7_3_6:1.5
	REL7_4_1:1.5
	REL7_3_5:1.5
	REL7_4:1.5
	REL7_4_RC2:1.5
	REL7_4_STABLE:1.5.0.10
	REL7_4_RC1:1.5
	REL7_4_BETA5:1.5
	REL7_4_BETA4:1.5
	REL7_4_BETA3:1.5
	REL7_4_BETA2:1.5
	WIN32_DEV:1.5.0.8
	REL7_4_BETA1:1.5
	REL7_3_4:1.5
	REL7_3_2:1.5
	REL7_2_4:1.5
	REL7_3_STABLE:1.5.0.6
	REL7_2_3:1.5
	REL7_2_STABLE:1.5.0.4
	REL7_2:1.5
	REL7_2_RC2:1.5
	REL7_2_RC1:1.5
	REL7_2_BETA5:1.5
	REL7_2_BETA4:1.5
	REL7_2_BETA3:1.5
	REL7_2_BETA2:1.5
	REL7_2_BETA1:1.5
	REL7_1_2:1.5
	REL7_1_STABLE:1.5.0.2
	REL7_1_BETA:1.5
	REL7_1_BETA3:1.5
	REL7_1_BETA2:1.5
	REL7_1:1.5
	REL6_5_PATCHES:1.2.0.4
	REL6_5:1.2
	REL6_4:1.2.0.2
	release-6-3:1.1.1.1
	REL2_0B:1.1.1.1.0.4
	REL2_0:1.1.1.1
	Release_2_0_0:1.1.1.1
	Release_1_0_3:1.1.1.1.0.2
	Release_2_0:1.1.1.1
	Release_1_0_2:1.1.1.1
	PG95-1_01:1.1.1.1
	PG95_DIST:1.1.1;
locks; strict;
comment	@# @;


1.7
date	2008.03.21.13.23.28;	author momjian;	state Exp;
branches;
next	1.6;

1.6
date	2005.06.21.20.45.44;	author tgl;	state Exp;
branches;
next	1.5;

1.5
date	2000.07.21.11.40.08;	author pjw;	state Exp;
branches;
next	1.4;

1.4
date	2000.07.04.14.25.26;	author momjian;	state Exp;
branches;
next	1.3;

1.3
date	2000.02.16.21.26.00;	author momjian;	state dead;
branches;
next	1.2;

1.2
date	98.03.14.21.57.14;	author momjian;	state Exp;
branches;
next	1.1;

1.1
date	96.07.09.06.22.14;	author scrappy;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	96.07.09.06.22.14;	author scrappy;	state Exp;
branches;
next	;


desc
@@


1.7
log
@More README src cleanups.
@
text
@$PostgreSQL: pgsql/src/backend/access/gin/README,v 1.5 2008/03/20 17:55:14 momjian Exp $

Notes on pg_dump
================

1. pg_dump, by default, still outputs text files.

2. pg_dumpall forces all pg_dump output to be text, since it also outputs text into the same output stream.

3. The plain text output format cannot be used as input into pg_restore.


To dump a database into the new custom format, type:

    pg_dump <db-name> -Fc > <backup-file>

or, to dump in TAR format

	pg_dump <db-name> -Ft > <backup-file>

To restore, try
 
   To list contents:

       pg_restore -l <backup-file> | less

   or to list tables:

       pg_restore <backup-file> --table | less

   or to list in a different order

       pg_restore <backup-file> -l --oid --rearrange | less

Once you are happy with the list, just remove the '-l', and an SQL script will be output.


You can also dump a listing:

       pg_restore -l <backup-file> > toc.lis
  or
       pg_restore -l <backup-file> -f toc.lis

edit it, and rearrange the lines (or delete some):

    vi toc.lis

then use it to restore selected items:

    pg_restore <backup-file> --use=toc.lis -l | less

When you like the list, type

    pg_restore backup.bck --use=toc.lis > script.sql

or, simply:

    createdb newdbname
    pg_restore backup.bck --use=toc.lis | psql newdbname


TAR
===

The TAR archive that pg_dump creates currently has a blank username & group for the files, 
but should be otherwise valid. It also includes a 'restore.sql' script which is there for
the benefit of humans. The script is never used by pg_restore.

Note: the TAR format archive can only be used as input into pg_restore if it is in TAR form.
(ie. you should not extract the files then expect pg_restore to work). 

You can extract, edit, and tar the files again, and it should work, but the 'toc'
file should go at the start, the data files be in the order they are used, and
the BLOB files at the end.


Philip Warner, 16-Jul-2000
pjw@@rhyme.com.au
@


1.6
log
@pg_dump can now dump large objects even in plain-text output mode, by
using the recently added lo_create() function.  The restore logic in
pg_restore is greatly simplified as well, since there's no need anymore
to try to adjust database references to match a new set of blob OIDs.
@
text
@d1 2
@


1.5
log
@- Support for BLOB output from pg_dump and input via pg_restore
- Support for direct DB connection in pg_restore
- Fixes in support for --insert flag
- pg_dump now outputs in modified OID order
- various other bug fixes
@
text
@d8 1
a8 1
3. The plain text output format can not be used as input into pg_restore.
a9 1
4. pg_dump now dumps the items in a modified OID order to try to improve relaibility of default restores.
d11 1
a11 2

To dump a database into the next custom format, type:
d15 1
a15 1
or, in TAR format
d29 1
a29 1
   or to list in a differnet orderL
a59 15
BLOBs
=====

To dump blobs you must use the custom archive format (-Fc) or TAR format (-Ft), and specify the 
--blobs qualifier to the pg_dump command.

To restore blobs you must use a direct database connection (--db=db-to-restore-to).

eg.

   pg_dump --blob -Fc db-to-backup -f backup.bck

   pg_restore backup.bck --db=db-to-restore-into


d65 1
a65 1
the benefit of humans. It is never used by pg_restore.
a76 3



@


1.4
log
@pg_dump patch from Philip Warner
@
text
@d4 1
a4 1
pg_dump, by default, still outputs text files.
d6 1
a6 1
pg_dumpall forces all pg_dump output to be text, since it also outputs text into the same output stream.
d8 3
a10 1
The plain text output format can not be used as input into pg_restore.
d17 4
d62 31
a92 1
Philip Warner, 3-Jul-2000
@


1.3
log
@README not needed anymore.
@
text
@d1 2
a2 7
pg_dump is a utility for dumping out a postgres database into a script
file containing query commands.  The script files are in a ASCII
format and can be used to reconstruct the database, even on other
machines and other architectures.  pg_dump will produce the queries
necessary to re-generate all user-defined types, functions, tables,
indices, aggregates, and operators.  In addition, all the data is
copied out in ASCII format so that it can be readily copied in again.
d4 1
d6 1
a6 1
To build:
d8 1
a8 1
	   % gmake clean install
a9 3
This version of the program will read in your postgreSQL database and
output the schema and the data tuples in SQL.  The dumps are useful
for moving from one postgreSQL installation to another.  
d11 1
d13 1
a13 2
How to use pg_dump:
-------------------
d15 3
a17 3
The command line options are fairly self explanatory.  Use -help to
see the command line options.   recommend using -v to get
more verbose descriptions of what pg_dump is doing.
d19 1
a19 2
After running pg_dump, one should examine the output script file for any 
warnings, especially in light of the limitations listed below.
d21 1
a21 1
A typical use of pg_dump:
d23 1
a23 3
	%  pg_dump -v -f oldDB.dump  oldDB
	%  createdb newDB
 	%  psql newDB < oldDB.dump
d25 1
d27 1
a27 2
Caveats and limitations:
------------------------
d29 1
a29 3
pg_dump has a few limitations.  The limitations mostly stem from
difficulty in extracting certain meta-information from the system
catalogs.   
a30 12
   rules and views:  
	pg_dump does not understand user-defined rules and views and
	will fail to dump them properly.  (This is due to the fact that
	rules are stored as plans in the catalogs and not textually)
	
   partial indices:
	pg_dump does not understand partial indices. (The reason is
	the same as above.  Partial index predicates are stored as plans)
	
   large objects:
	pg_dump does not handle large objects.  Large
	objects are ignored and must be dealt with manually.
d32 1
a32 5
   oid preservation:
 	pg_dump does not preserve oid's while dumping.  If you have
	stored oid's explicitly in tables in user-defined attributes,
	and are using them as keys, then the output scripts will not
	regenerate your database correctly. 
d34 3
a36 1
pg_dump requires postgres95 beta0.03 or later.
d38 1
a38 2
Bug-reporting
--------------
d40 18
a57 4
If you should find a problem with pg_dump, it is very important that
you provide a (small) sample database which illustrates the problem.
Please send bugs, questions, and feedback to the
	postgres95@@postgres95.vnet.net
@


1.2
log
@Change Postgres95 to PostgreSQL.  Update CLUSTER manual page.
@
text
@@


1.1
log
@Initial revision
@
text
@d14 1
a14 1
This version of the program will read in your postgres95 database and
d16 1
a16 1
for moving from one postgres95 installation to another.  
@


1.1.1.1
log
@Postgres95 1.01 Distribution - Virgin Sources
@
text
@@
