Re: pg_dump schma while excluding specific table

From: Greg Williamson <gwilliamson39(at)yahoo(dot)com>
To: Tony Capobianco <tcapobianco(at)prospectiv(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: pg_dump schma while excluding specific table
Date: 2011-11-03 18:46:10
Message-ID: 1320345970.24716.YahooMailNeo@web46101.mail.sp1.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Tony --

> When I issue:
>
> pg_dump newdb > /DUMPDIR/newdb.dmp -n dev -T corgi -w -v -F c 2>
> /DUMPDIR/newdb.log
>
> I get a dump of the entire dev schema.  My goal is to dump the dev
> schema minus the corgi table.  How can I adjust my script to perform
> this function?
>
> Thanks.

Maybe the order of your arguments is causing some issues. This worked for me

  pg_dump -s -T product_feed_data staging_feed > sf.sql

Where staging_feed is that database and product_feed_data is the table I excluded:
grep product_feed_data sf.sql | grep -v product_feed_data_
COMMENT ON TABLE product_key IS 'A temporary table used to sync product_feed_data.does_exist_in_product.  ...

HTH,

Greg Williamson

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2011-11-03 19:02:55 Re: pg_dump schma while excluding specific table
Previous Message Robert Treat 2011-11-03 18:09:16 Re: FATAL: password authentication failed for user "postgres"