Re: Is there a way to dump schema to files on disk and keep them in sync - Mailing list pgsql-general

From Adrian Klaver
Subject Re: Is there a way to dump schema to files on disk and keep them in sync
Date
Msg-id 67162da0-f9b1-eb6c-a19a-b6973b3c2541@aklaver.com
Whole thread Raw
In response to Re: Is there a way to dump schema to files on disk and keep them in sync  (Tim Uckun <timuckun@gmail.com>)
List pgsql-general
On 12/13/20 1:04 PM, Tim Uckun wrote:
>> pgAdmin does not create directories, it just organizes the contents of
> the system catalogs into GUI elements.
> 
> 
> I realize that :). I meant organized in the same way but on disk.
> 

Nothing that I know of. You could do a pg_dump -d some_db 
-s/--schema-only and to get a starting point for schema definitions. 
Then create your own directory structure for the schema types(tables, 
functions, types, etc), with sub-directories for the individual items. I 
did something like that years ago and it worked until it fell over. For 
instance should triggers definitions stay with the table or be on their 
own, same for trigger functions. What happens if you rename something, 
do you rename your directory? And so on. That is why I moved to Sqitch, 
someone smarter then I came up with a solution that worked and allows me 
to do what you state is your goal in your previous post. Namely, use for 
development and experimentation. In addition once you have done the 
preceding can then roll out to production.

-- 
Adrian Klaver
adrian.klaver@aklaver.com



pgsql-general by date:

Previous
From: Tim Uckun
Date:
Subject: Re: Is there a way to dump schema to files on disk and keep them in sync
Next
From: Benedict Holland
Date:
Subject: Re: Is there a way to dump schema to files on disk and keep them in sync