Search Postgresql Archives

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxx





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux