X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id A188032AD21 for ; Mon, 11 Oct 2004 00:03:20 +0100 (BST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 95651-08 for ; Sun, 10 Oct 2004 23:03:12 +0000 (GMT) Received: from angel.lonelyplanet.com.au (mail.lonelyplanet.com.au [202.147.44.168]) by svr1.postgresql.org (Postfix) with ESMTP id 3DF3132AC8F for ; Mon, 11 Oct 2004 00:03:12 +0100 (BST) Received: from shiva.au.lpint.net ([192.168.61.22]) by angel with InterScan Messaging Security Suite; Mon, 11 Oct 2004 08:59:18 +1000 Received: by shiva.au.lpint.net with Internet Mail Service (5.5.2656.59) id <44T2BKHY>; Mon, 11 Oct 2004 08:59:41 +1000 Message-ID: <82E30406384FFB44AFD1012BAB230B5505F40D3A@shiva.au.lpint.net> From: Theo Galanakis To: "'pgsql-sql@postgresql.org'" Subject: Export tab delimited from mysql to postgres. Date: Mon, 11 Oct 2004 08:59:40 +1000 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2656.59) Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C4AF1C.D2EB7D50" X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=1.6 tagged_above=0.0 required=5.0 tests=DNS_FROM_RFCI_DSN, EXCUSE_16, HTML_MESSAGE X-Spam-Level: * X-Archive-Number: 200410/71 X-Sequence-Number: 19174 This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_001_01C4AF1C.D2EB7D50 Content-Type: text/plain Has anyone been able to export and import a tab delimited file from mysql to postgres successfully? This is my dilemma which I have posted on mysql sites with no response, however postgres users may have come across the same issue: Trying to export a tab delimited file with the following command, however it does not appear to strip out the CR/LF within a varchar column. select * into outfile '/tmp/users.txt' FIELDS ESCAPED BY '\\' LINES TERMINATED BY '\r\n' from users; However when I use the below function to export as an insert statement, it escapes all the CR/LF within each column. mysqldump --database mydatabase --password --user myusername --verbose --complete-insert --tables users > myfile.sql Does anyone have any insigt into why the above select does not escape CR/LF within varchar columns? I really want to get the export as tab delimited working to import into postgres,which is much faster than insert statements. Theo ______________________________________________________________________ This email, including attachments, is intended only for the addressee and may be confidential, privileged and subject to copyright. If you have received this email in error, please advise the sender and delete it. If you are not the intended recipient of this email, you must not use, copy or disclose its content to anyone. You must not copy or communicate to others content that is confidential or subject to copyright, unless you have the consent of the content owner. ------_=_NextPart_001_01C4AF1C.D2EB7D50 Content-Type: text/html Content-Transfer-Encoding: quoted-printable Export tab delimited from mysql to postgres.

Has anyone been able to export and import= a tab delimited file from mysql to postgres successfully?
This is my dilemma which I have posted o= n mysql sites with no response, however postgres users may have come across= the same issue:

Trying to export a tab delimited file wit= h the following command, however it does not appear to strip out the CR/LF = within a varchar column.

select * into outfile '/tmp/users.txt' FIELDS ESCAPED BY '\\' LINES TERMINA= TED BY '\r\n' from users;

However when I use the below function to export as an insert statement, it = escapes all the CR/LF within each column.

mysqldump --database mydatabase --password --user myusername --verbose --co= mplete-insert --tables users > myfile.sql

Does anyone have any insigt into why the above select does not escape CR/LF= within varchar columns?

I really want to get the export as tab delimited working to import into pos= tgres,which is much faster than insert statements.

Theo

____________________= __________________________________________________
This email, including= attachments, is intended only for the addressee
and may be confidential= , privileged and subject to copyright. If you
have received this email = in error, please advise the sender and delete
it. If you are not the in= tended recipient of this email, you must not
use, copy or disclose its c= ontent to anyone. You must not copy or
communicate to others content t= hat is confidential or subject to
copyright, unless you have the consen= t of the content owner.
= ------_=_NextPart_001_01C4AF1C.D2EB7D50--