Re: pg_dump schma while excluding specific table - Mailing list pgsql-general

From Greg Williamson
Subject Re: pg_dump schma while excluding specific table
Date
Msg-id 1320345970.24716.YahooMailNeo@web46101.mail.sp1.yahoo.com
Whole thread Raw
In response to pg_dump schma while excluding specific table  (Tony Capobianco <tcapobianco@prospectiv.com>)
List 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

pgsql-general by date:

Previous
From: Robert Treat
Date:
Subject: Re: FATAL: password authentication failed for user "postgres"
Next
From: Adrian Klaver
Date:
Subject: Re: pg_dump schma while excluding specific table