Re: pg_dump --split patch

Joel Jacobson <joel@gluefinance.com>

From: Joel Jacobson <joel@gluefinance.com>
To: Dimitri Fontaine <dimitri@2ndquadrant.fr>
Cc: pgsql-hackers@postgresql.org
Date: 2010-12-30T07:13:20Z
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 →
  1. pg_dump: Output functions deterministically sorted

  2. When sorting functions in pg_dump, break ties (same name) by number of arguments

2010/12/29 Dimitri Fontaine <dimitri@2ndquadrant.fr>

> Please have a look at getddl:
>
>  https://github.com/dimitri/getddl
>
>
Nice! Looks like a nifty tool.
When I tried it, "./getddl.py -f -F /crypt/funcs -d glue", I got the error
"No such file or directory: 'sql/schemas.sql'".

While the task of splitting objects into separate files could be solved by
an external "wrapper tool" like yours around pg_dump,
I argue it makes more sense of putting the (minimal required) logics into
pg_dump, due to a number of reasons, most importantly because it's simplier
and less complex, thus less error prone.

My patch is only a few lines of code and doesn't add any logics to pg_dump,
it merely reroutes the fwrite() system calls based on the toc entries.

Just the fact you and others had to create own tools to do the splitting
shows the feature is important, which I think should be included in the
normal pg_dump tool.

Happy new year!

Joel Jacobson
Glue Finance