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.
---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faqs/FAQ.html