Search Postgresql Archives

Re: Migrating data from Oracle 9i to PostgreSQL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Tuesday 04 April 2006 14:01, krokodylek@xxxxxxxxx wrote:
| I sure hope I'm asking in the right place...
|
| Is there any automated or semi-automated way of migrating data from Oracle
| database (9.2.0.4) to PostgreSQL one?
|
| I only need the data, nothing else (not stored procedures, indexes, etc.),
| the relations are pretty simple, for example:

you might want to look at the scripts from the contrib/oracle directory from
the PostgreSQL source distribution. It did help me a lot to migrate two
databases from Oracle to PostgreSQL. It might be useful to apply the attached
patch: it escapes some more characters in the generated SQL dump.

Ciao,
Thomas

-- 
Thomas Pundt <thomas.pundt@xxxxxxxxxxxx> ---- http://rp-online.de/ ----
--- Ora2Pg.pm	2004-12-30 01:30:40.000000000 +0100
+++ Ora2Pg.pm	2006-03-14 14:40:16.000000000 +0100
@@ -1091,8 +1091,11 @@
 								}
 							}
 						} else {
-							# remove end of line
+							# remove end of line and tab
+							$row->[$i] =~ s/\\/\\\\/gs;
 							$row->[$i] =~ s/\n/\\n/gs;
+							$row->[$i] =~ s/\r/\\r/gs;
+							$row->[$i] =~ s/\t/\\t/gs;
 
 							if ($tt[$i] !~ /(char|date|time|text)/) {
 								$row->[$i] =~ s/,/./;

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux