pg_dump as a bunch of PostgreSQL functions - Mailing list pgsql-hackers

From Mark Gibson
Subject pg_dump as a bunch of PostgreSQL functions
Date
Msg-id 7081aa27b64fcb42ddcbbbbb479acb874146ae42@cromwell.co.uk
Whole thread Raw
Responses Re: pg_dump as a bunch of PostgreSQL functions
Re: pg_dump as a bunch of PostgreSQL functions
Re: pg_dump as a bunch of PostgreSQL functions
List pgsql-hackers
Hello folks,

I have an idea, to break pg_dump into functions within PostgreSQL.

We currently have some functions like pg_get_viewdef, but it would
be great to have a function or functions to dump the SQL definition
of any object.

This would allow easy dumping of any object from admin interfaces,
and allow totally customized consistent dumps from within a
transaction.
In combination with dblink, it would also allow easy replication of
objects between databases.
From there we could add diff functions, that take two similar
objects and produces the SQL commands to transform one into the
other.
This would help greatly when it comes to development, migrating
the schema, etc.

Would this be practical, would it be possible to break the pg_dump
code out into PostgreSQL functions?

Anyone have any ideas/thoughts/suggestions on this?

Cheers
-- 
Mark Gibson <gibsonm |AT| cromwell |DOT| co |DOT| uk>
Web Developer & Database Admin
Cromwell Tools Ltd.
Leicester, England.


pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Why are there client-only encodings?
Next
From: Christopher Kings-Lynne
Date:
Subject: Re: pg_dump as a bunch of PostgreSQL functions