Re: Help to dump tables in a database and restore in another database

From: Thomas Kellerer <spam_eater(at)gmx(dot)net>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: Help to dump tables in a database and restore in another database
Date: 2010-01-05 10:50:15
Message-ID: hhv5h6$beb$1@ger.gmane.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Intengu Technologies, 05.01.2010 11:42:
> pg_dump --host localhost --port 5432 --username postgres -o -v -t
> 'myschema.*' dbname> mydump.sql
>
> This generates an error no matching tables were found, is the asterisk
> not a wild card meaning all tables found in the schema named myschema

No. The wildcard character in SQL is %

But to select all tables from a specific schema, you can use the -n switch:

pg_dump -n myschema ...

Check out pg_dump's documentation (Joshua has already posted the link)

Thomas

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Sean Davis 2010-01-05 11:05:08 Re: Help to dump tables in a database and restore in another database
Previous Message Intengu Technologies 2010-01-05 10:42:34 Re: Help to dump tables in a database and restore in another database