Re: Is there a way to dump schema to files on disk and keep them in sync

Поиск
Список
Период
Сортировка
От Adrian Klaver
Тема Re: Is there a way to dump schema to files on disk and keep them in sync
Дата
Msg-id 67162da0-f9b1-eb6c-a19a-b6973b3c2541@aklaver.com
обсуждение исходный текст
Ответ на Re: Is there a way to dump schema to files on disk and keep them in sync  (Tim Uckun <timuckun@gmail.com>)
Список 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 по дате отправления:

Предыдущее
От: Tim Uckun
Дата:
Сообщение: Re: Is there a way to dump schema to files on disk and keep them in sync
Следующее
От: Benedict Holland
Дата:
Сообщение: Re: Is there a way to dump schema to files on disk and keep them in sync