Re: Schema dump

2020-01-02 Thread Adrian Klaver
Sonam Sharma mailto:sonams1...@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

Re: Schema dump

2020-01-02 Thread Sonam Sharma
Thanks Adrian, it worked :) On Thu, Jan 2, 2020, 9:50 PM Adrian Klaver wrote: > On 1/2/20 5:47 AM, Tom Lane wrote: > > Sonam Sharma writes: > >> I took a schema dump using : pg_dump -n schema dbname . > >> When I restored this , it doesn't contain th

Re: Schema dump

2020-01-02 Thread Adrian Klaver
On 1/2/20 5:47 AM, Tom Lane wrote: Sonam Sharma 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 "work

Re: Schema dump

2020-01-02 Thread Adrian Klaver
On 1/2/20 5:47 AM, Tom Lane wrote: Sonam Sharma 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 "work

Re: Schema dump

2020-01-02 Thread Tom Lane
Sonam Sharma 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

Schema dump

2020-01-01 Thread Sonam Sharma
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

Re: Schema dump/restore not restoring grants on the schema

2019-10-01 Thread Adrian Klaver
On 10/1/19 8:49 AM, Mike Roest wrote: Thanks for the reply Tom,    We're going to look at removing the filtering on the pg_restore which I think should allow us to move forward since we have the pg_dump already filtered. It will. If you want to verify do: pg_restore -f testschema.txt test.b

Re: Schema dump/restore not restoring grants on the schema

2019-10-01 Thread Adrian Klaver
On 10/1/19 7:53 AM, Tom Lane wrote: Mike Roest writes: Just trying to find out if something is intended behaviour. When doing a schema filtered pg_dump the created dump file includes the grants on that specific schema (in our case a grant usage to a unprivleged user) but doing a pg_restore

Re: Schema dump/restore not restoring grants on the schema

2019-10-01 Thread Mike Roest
Thanks for the reply Tom, We're going to look at removing the filtering on the pg_restore which I think should allow us to move forward since we have the pg_dump already filtered. --Mike

Re: Schema dump/restore not restoring grants on the schema

2019-10-01 Thread Tom Lane
Mike Roest writes: >Just trying to find out if something is intended behaviour. When doing a > schema filtered pg_dump the created dump file includes the grants on that > specific schema (in our case a grant usage to a unprivleged user) but doing > a pg_restore with a -n does not restore that

Schema dump/restore not restoring grants on the schema

2019-10-01 Thread Mike Roest
Hi There, Just trying to find out if something is intended behaviour. When doing a schema filtered pg_dump the created dump file includes the grants on that specific schema (in our case a grant usage to a unprivleged user) but doing a pg_restore with a -n does not restore that grant however ind