Re: Schema dump - Mailing list pgsql-general

From Tom Lane
Subject Re: Schema dump
Date
Msg-id 11647.1577972854@sss.pgh.pa.us
Whole thread Raw
In response to Schema dump  (Sonam Sharma <sonams1209@gmail.com>)
Responses Re: Schema dump
Re: Schema dump
List pgsql-general
Sonam Sharma <sonams1209@gmail.com> writes:
> I took a schema dump using : pg_dump -n schema dbname .
> When I restored this , it doesn't contain the constraints and indexes. Can
> someone please help how to take a dump including all

Hmph ... works for me.  Where by "works", I mean "the dump contains
constraints and indexes belonging to tables in the specified schema,
and not any others".  Maybe you could provide a little more detail?

(One thing I notice is that the dump doesn't contain a "CREATE
SCHEMA schema" command, so you have to do that manually before
you restore.  I guess this fits with the definition of the switch
as selecting objects *in* the named schema, but it's still a
possible gotcha.)

            regards, tom lane



pgsql-general by date:

Previous
From: Sonam Sharma
Date:
Subject: Schema dump
Next
From: Adrian Klaver
Date:
Subject: Re: Schema dump