On Jul 25, 2006, at 2:59 PM, MC Moisei wrote:
I'm looking to migrate psql db1 to a psql db2 that has a different structure even though 70% would be the same. I'd need a tool that allows me to map field to field and then migrate the data from one db to another. Needless to say that preserving data integrity is very important.
I'm not aware of any migration tool to help on this (other than a good SQL editor ;). It seems the best approach is to load an exact copy of db1 and then write a script to transform it into db2, creating, dropping, and altering the structure as necessary.
I think there are some tools (EMS?) that can compare schemas and generate the SQL to transform db1 to db2. But there is a good chance an automated approach like this will not transform data the way you want.
John DeSoi, Ph.D. http://pgedit.com/ Power Tools for PostgreSQL ---------------------------(end of broadcast)--------------------------- TIP 4: Have you searched our list archives? http://archives.postgresql.org