Thread: A powerful dump utility
Hello! Is there an utility to dump PosgreSQL database with possibility to set order of tables? I have a situation when one of my tables was created with constraint check depending on another table. But when I do dump, my dependable table dumped first, and then when I restore my database it fails to load my data because of constraint check. I wrote my own script and first I dump schema of my database and then all tables in order I want. But dump of databse schema doesn't include: SELECT setval ('"vl_id"', 198, true); to setup my sequences well. So are there any possibilities to solve my problem? -- Best regards Andrey Feofilactovich. e-mail: feo@ttn.ru, feo@feo.org.ru ICQ: 28073807
On Tue, Jan 28, 2003 at 08:13:32AM +0300, Andrey Mosienko wrote: > > Hello! > > > Is there an utility to dump PosgreSQL database with possibility to set order of > tables? Yes. Use the "custom" format of pg_dump, use pg_restore to get the catalogue, and then re-order the files in the catalogue. See the man pages for pg_dump and pg_restore. A -- ---- Andrew Sullivan 204-4141 Yonge Street Liberty RMS Toronto, Ontario Canada <andrew@libertyrms.info> M2P 2A8 +1 416 646 3304 x110