Re: pg_dump --split patch

Поиск
Список
Период
Сортировка
От Hannu Krosing
Тема Re: pg_dump --split patch
Дата
Msg-id 4D22EF53.30300@krosing.net
обсуждение исходный текст
Ответ на pg_dump --split patch  (Joel Jacobson <joel@gluefinance.com>)
Список pgsql-hackers
On 28.12.2010 17:00, Joel Jacobson wrote:
> Dear fellow hackers,
>
> Problem: A normal diff of two slightly different schema dump files 
> (pg_dump -s), will not produce a user-friendly diff, as you get all 
> changes in the same file.
>
Another Solution: I have used a python script for spliiting "dump -s" 
output into a directory structure for years

A structure that seems to work well is

1. <database_name>.load.sql - file containing \i for all other files
2. tree of
schema1\    +- <objtype1>\    |    + obj_of_type1_name1.sql    |    + ...    +-<objtype2>\ ...

That is, first have one directory per schema on top level and then one 
for each type of objects
inside have one file per object.
Some things which may have non-unique names, like functions need extra 
"uniquefication", like adding a underscore (or colon) separated list of 
argument types at the end.

Most times you want to  leave out the comment lines with OIDs so that 
you can diff the files against another version

------------------------------------------
Hannu Krosing
http://www.2ndQuadrant.com/books/


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Hannu Krosing
Дата:
Сообщение: Re: pg_dump --split patch
Следующее
От: Greg Smith
Дата:
Сообщение: Re: Re: new patch of MERGE (merge_204) & a question about duplicated ctid