pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alberto <nspmma@freenet.de>
To: pgsql-admin@postgresql.org
Subject: pg_dump -Fc does not dump indexes]
Date: Sat, 25 Jun 2005 08:55:30 -0700
Message-ID: <42BD7E72.3050201@freenet.de> (raw)

Hi everybody,
I have tried to backup my postgres database with
   pg_dump -Fc $db > ~/backups/$db.backup.c
and restore it with:
   createdb -U postgres -D aestel_admin -T template0 restoreTMP
   pg_restore -d restoreTMP -U postgres $db.backup.c 

I do not get any error messages but none of my indexes are created. None 
of the primary key or foreign key constraint are created. However simple 
check constraints are created.

Using the -v flag does not show any index creation.

Using the -l option to list the commands does not show any indexes either.
   pg_restore -lv -U postgres $db.backup.c

pg_dump -vFc does produce lines like:
   pg_dump: reading indexes for table "acc_controlled_expression"

If I do not use the -Fc option just plain
   pg_dump $db >t
then "Alter Table add constraint PRIMARY KEY" and foreign key statements 
are created as well as create unique index statements.

Is this a known feature, other people must be using the same commands.
Do I need to use pg_dump without the -FC option to create the tables, 
indexes and constraints?

Am I missing something?

Any help is greatly appreciated.

Thanks,
Alberto Gobbi





view thread (7+ messages)  latest in thread

Message-ID: <42BD7E72.3050201@freenet.de>
Permalink:  ../42BD7E72.3050201@freenet.de/
Also on:    postgresql.org/message-id/42BD7E72.3050201@freenet.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: nspmma@freenet.de
  Subject: Re: pg_dump -Fc does not dump indexes]
  In-Reply-To: <42BD7E72.3050201@freenet.de>
  References: <42BD7E72.3050201@freenet.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox