Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-novice by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group