Re: pg_dump --split patch
Hannu Krosing <hannu@krosing.net>
From: Hannu Krosing <hannu@krosing.net>
To: pgsql-hackers@postgresql.org
Cc: Joel Jacobson <joel@gluefinance.com>
Date: 2011-01-04T09:58:43Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
pg_dump: Output functions deterministically sorted
- 7b583b20b1c9 9.3.0 cited
-
When sorting functions in pg_dump, break ties (same name) by number of arguments
- 1acc06a1f4ae 9.0.0 cited
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/