Re: database data transferring.

From: Date: Wed, 19 Jun 2002 19:55:30 +0000
Subject: Re: database data transferring.
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-19887@lists.php.net to get a copy of this message
I don't know if I understood your problem correctly, but I'll take a stab at what I think you're running into... If you have binary "escaped" data, you'll need to double-escape it to insert it into the PG database to preserve the original string. I'll use a string-type example... Original: This is Mike's String MySQL: This is Mike\'s String <-- this is in your dump, I presume. Put it into the PG database.. Insert into mytable values (.. 'This is Mike\'s String') But now your data is "This is Mike's String in the database. So we escape the escape sequence.... insert into mytable values (...'This is Mike\\\'s String') And your data in the PGdb is "This is Mike\'s String" If you're running into \ in the binary part, you'll simply have to escape it via \\ to keep the literal meaning of the single slash. The amount of "work" you'll have to do depends on how exactly your data is stored in the MySQL db... 'Luck. -Mike ----- Original Message ----- From: "Gerard Samuel" <gsam@trini0.org> To: "php-db" <php-db@lists.php.net> Sent: Wednesday, June 19, 2002 12:36 PM Subject: [PHP-DB] database data transferring. > Ill looking for some tips. > Im converting a mysql dump to a postgre dump. > I have the table structure made up, but whats kicking me is that, > a good bit of the data stored in mysql is binary data. > Postgre is complaining about \ in the data when Im attempting to dump > on some of the tables. I cannot modify the data, because, > it will change the representation of the data. > So I was wondering if anyone went through something like this can > provide a tip or two on a workaround. > Thanks. > > -- > Gerard Samuel > http://www.trini0.org:81/ > http://dev.trini0.org:81/ > > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.db (#19887) next »