Re: DDL for a single schema

From: Shridhar Daithankar <shridhar_daithankar(at)myrealbox(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Re: DDL for a single schema
Date: 2003-11-07 14:11:29
Message-ID: 200311071941.29800.shridhar_daithankar@myrealbox.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Friday 07 November 2003 19:36, Shridhar Daithankar wrote:
> On Friday 07 November 2003 18:53, btober(at)seaworthysys(dot)com wrote:
> > Is there a way to get a dump of all the DDL and data associated with a
> > single schema within a database?
> >
> > What I tried in attempting to hack this out was
> >
> > \dt consume.*
> >
> > and
> >
> > \dv consume.*
> >
> > to get a list of tables and views in the schema named "consume", then
> > sent those lists to a file "tables.txt". Followed that with something
> > like
> >
> > for n in `cat tables.txt` do; pg_dump -t $n >> consume.sql; done
>
> pg_dump in 7.4 has the dump option. You need to use --schema as option.
>
> Check developers documentation on web site or download RC1 and try out
> yourself.

http://developer.postgresql.org/docs/postgres/app-pgdump.html

Sorry for missing it first time..

Shridhar

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Barbara Lindsey 2003-11-07 14:25:40 error when creating rule
Previous Message Shridhar Daithankar 2003-11-07 14:06:11 Re: DDL for a single schema