MySQL -> Postres sql insertion errors

I am attempting to migrate my data from MySQL to Postgres to see if that
speeds up my RT installation. So far I have created the Postgres
schema, and exported the data from Mysql.
When I attempt to import the data into Postgres, I get lots of nasty
messages
psql:Migrationfile.sql:338: ERROR: duplicate key violates unique
constraint "attachments_pkey"
psql:Migrationfile.sql:339: ERROR: duplicate key violates unique
constraint "attachments_pkey"
psql:Migrationfile.sql:340: ERROR: duplicate key violates unique
constraint "attachments_pkey"
psql:Migrationfile.sql:341: ERROR: duplicate key violates unique
constraint "attachments_pkey"
psql:Migrationfile.sql:342: ERROR: duplicate key violates unique
constraint "attachments_pkey"
psql:Migrationfile.sql:343: ERROR: duplicate key violates unique
constraint "attachments_pkey"
psql:Migrationfile.sql:344: ERROR: duplicate key violates unique
constraint "attachments_pkey"
psql:Migrationfile.sql:345: ERROR: duplicate key violates unique
constraint "attachments_pkey"
psql:Migrationfile.sql:346: ERROR: duplicate key violates unique
constraint "attachments_pkey"
psql:Migrationfile.sql:347: invalid command \0�~H9��~Y�Rq
psql:Migrationfile.sql:347: \r: extra argument “278” ignored
psql:Migrationfile.sql:347: \r: extra argument “333” ignored
psql:Migrationfile.sql:347: \r: extra argument “474” ignored
psql:Migrationfile.sql:347: \r: extra argument “556” ignored
psql:Migrationfile.sql:347: \r: extra argument “556” ignored
psql:Migrationfile.sql:347: \r: extra argument “889” ignored
psql:Migrationfile.sql:347: \r: extra argument “722” ignored
psql:Migrationfile.sql:347: \r: extra argument “238” ignored
psql:Migrationfile.sql:347: \r: extra argument “333” ignored
psql:Migrationfile.sql:347: \r: extra argument “333” ignored
psql:Migrationfile.sql:347: \r: extra argument “389” ignored

The insert on line 347 looks like this:

INSERT INTO Attachments (id, TransactionId, Parent, MessageId, Subject,
Filename, ContentType, ContentEncoding, Content, Headers, Cr
eator, Created) VALUES
(152,248,148,NULL,’’,‘Estimate_17_from_XXXXXXXXXXXpdf’,‘application/pdf’,‘none’,’%PDF-1.3\r\n%����\r

\n5 0 obj\r<< /Length 6 0 R /Filter /FlateDecode

\rstream\rx^~]X�~N�6^P�^B��\0M~A^D�hI~J^T��\�6i~QfÝ¢^E��J�~I–$^Yi���J$M�r^P`#z

�~\�p8�^H^C^R����9�~^�W��K
8�^D�~_VZ~@~A~V,C^TxN3\n���)�P^N�~M^P����Wø;�c�^D�_V��~Z�~B*d)HV^U�1~ZY�~Y��~@��7~A�mծ(U�pB3V�aZ#^B��~

]PhWLzg�j�^HC��^\�^HT~HW�t\Z\r˳~RBQr�~_^H^G͡^T���%^HQ^[O�,\n^e~T�AL^^^D�3^^NB^C~I�^S;�p~YagG��\n?�a~\M4�~E#~T~K�^V�~Z~Q�=d*�,g2�

h�1^O<Ne�~Z�FCa�#-~Y~S^]"^S�.~D\Z�^Y)m�S��^R>�Qɻi^Lʫ*C�^R~^Q�~J,I���`^R~TO��w�^L�~I�p^N�v^Kb^P\Z;~U�O�^D

^V�Rao�]/uv�E[�A�xzz�(��M�^Y�~I:�~[ɬv�^G�z^B�We5^A_~ZS�L~Z��B$��y�~^C^N{=5U��u~RD^]���%^L�~G�9�¼h�$�Zw�//aM�"PB^W%.g~Y^S���\n�T^U

�"}�~L��^K;w��^[6�pl7��q/���^F�^^O^OM/^^���Y\T>�Ue^U~C2�$?��~R^DKs~CX~V~X~R_�~_~[v�^]^G�~N�~S’�^]~[��/2~[�X�^_�K^Lz�~AK^R,�K.^F

~D�~Q������3��Xæ�b�^Y�:Y~S^Q�x\��^L�|
W��^XA%\Z��^L�^O���)~^~Vp�^]�^A>~I~Z^Y�u06~[{Ѣvu��L���p�~[�^?�~I
)+�\0}\n-�8O��~R.~B~K�J
��8��~Uׯ^^�^[�D?���~F^F~S�~�^Ny�Ks~Q;\~T?F�|^Bs�yDx�x�?r1~T�endstream\rendobj\r6
0 obj\r1473\rendobj\r7 0 obj\r<<\r/Type /Page\r/P
arent 3 0 R\r/MediaBox [0 0 612 792]\r/Rotate 0\r/Contents [5 0
R]\r/Resources <<\r/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]\r/C
olorSpace << /CS1 [/Pattern /DeviceGray] /CS2 [/Pattern /DeviceRGB]

\r/Font << /F8 8 0 R /F9 9 0 R /F10 10 0 R >>\r>>\r>>\rendobj
r8 0 obj\r<<\r/Type /Font\r/Subtype /TrueType\r/Name /F8\r/BaseFont
/Arial,Bold\r/Encoding /WinAnsiEncoding\r/FirstChar 32\r/LastCha
r 255\r/Widths [ \r278 333 474 556 556 889 722 238 333 333 389 584 278
333 278 278 556 556 556 556 556 556 556 556 556 556 333 333 5
84 584 584 611 975 722 722 722 722 667 611 778 722 278 556 722 611 833
722 778 667 778 722 667 611 722 667 944 667 667 611 333 278 3
33 584 556 \r333 556 611 556 611 556 333 611 611 278 278 556 278 889 611
611 611 611 389 556 333 611 556 778 556 556 500 389 280 389
584 420 556 420 278 556 500 1000 556 556 333 1000 667 333 1000 420 611
420 420 278 278 500 500 350 556 1000 333 1000 556 333 944 42
0 500 667 \r278 333 556 556 556 556 280 556 333 737 370 556 584 333 737
552 400 549 333 333 333 576 556 278 333 333 365 556 834 834
834 611 722 722 722 722 722 722 1000 722 667 667 667 667 278 278 278 278
722 722 778 778 778 778 778 584 778 722 722 722 722 667 667
611 \r556 556 556 556 556 556 889 556 556 556 556 556 278 278 278 278
611 611 611 611 611 611 611 549 611 611 611 611 611 556 611 5
56 ]\r/FontDescriptor 11 0 R\r>>\rendobj\r11 0 obj\r<<\r/Type
/FontDescriptor\r/FontName /Arial,Bold\r/Flags 32\r/FontBBox [ -628 -3
76 2034 1010 ]\r/MissingWidth 760\r/StemV 80\r/StemH 80\r/ItalicAngle
0\r/CapHeight 820\r/XHeight 574\r/Ascent 820\r/Descent 220\r/L
eading 40\r/MaxWidth 1020\r/AvgWidth 420\r>>\rendobj\r9 0 obj\r<<\r/Type
/Font\r/Subtype /TrueType\r/Name /F9\r/BaseFont /Arial\r/En
coding /WinAnsiEncoding\r/FirstChar 32\r/LastChar 255\r/Widths [ \r278
278 355 556 556 889 667 191 333 333 389 584 278 333 278 278 5
56 556 556 556 556 556 556 556 556 556 278 278 584 584 584 556 1015 667
667 722 722 667 611 778 722 278 500 667 556 833 722 778 667
778 722 667 611 722 667 944 667 667 611 278 278 278 469 556 \r333 556
556 500 556 556 278 556 556 222 222 500 222 833 556 556 556 55
6 333 500 278 556 500 722 500 500 500 334 260 334 584 420 556 420 222
556 333 1000 556 556 333 1000 667 333 1000 420 611 420 420 222
222 333 333 350 556 1000 333 1000 500 333 944 420 500 667 \r278 333 556
556 556 556 260 556 333 737 370 556 584 333 737 552 400 549
333 333 333 576 537 278 333 333 365 556 834 834 834 611 667 667 667 667
667 667 1000 722 667 667 667 667 278 278 278 278 722 722 77
8 778 778 778 778 584 778 722 722 722 722 667 667 611 \r556 556 556 556
556 556 889 500 556 556 556 556 278 278 278 278 556 556 556
556 556 556 556 549 611 556 556 556 556 500 556 500 ]\r/FontDescriptor
12 0 R\r>>\rendobj\r12 0 obj\r<<\r/Type /FontDescriptor\r/Fon
tName /Arial\r/Flags 32\r/FontBBox [ -665 -325 2028 1006
]\r/MissingWidth 760\r/StemV 80\r/StemH 80\r/ItalicAngle 0\r/CapHeight 820
r/XHeight 574\r/Ascent 820\r/Descent 220\r/Leading 40\r/MaxWidth
1020\r/AvgWidth 420\r>>\rendobj\r10 0 obj\r<<\r/Type /Font\r/Subtyp
e /TrueType\r/Name /F10\r/BaseFont /TimesNewRoman\r/Encoding
/WinAnsiEncoding\r/FirstChar 32\r/LastChar 255\r/Widths [ \r250 333 408
500 500 833 778 180 333 333 500 564 250 333 250 278 500 500 500 500 500
500 500 500 500 500 278 278 564 564 564 444 921 722 667 667
722 611 556 722 722 333 389 722 611 889 722 722 556 722 667 556 611 722
722 944 722 722 611 333 278 333 469 500 \r333 444 500 444 5
00 444 333 500 500 278 278 500 278 778 500 500 500 500 333 389 278 500
500 722 500 500 444 480 200 480 541 420 500 420 333 500 444 1
000 500 500 333 1000 556 333 889 420 611 420 420 333 333 444 444 350 500
1000 333 980 389 333 722 420 444 722 \r250 333 500 500 500
500 200 500 333 760 276 500 564 333 760 500 400 549 300 300 333 576 453
250 333 300 310 500 750 750 750 444 722 722 722 722 722 722
889 667 611 611 611 611 333 333 333 333 722 722 722 722 722 722 722 564
722 722 722 722 722 722 556 500 \r444 444 444 444 444 444 66
7 444 444 444 444 444 278 278 278 278 500 500 500 500 500 500 500 549
500 500 500 500 500 500 500 500 ]\r/FontDescriptor 13 0 R\r>>
rendobj\r13 0 obj\r<<\r/Type /FontDescriptor\r/FontName
/TimesNewRoman\r/Flags 32\r/FontBBox [ -568 -307 2028 1007 ]\r/MissingWidth
760\r/StemV 80\r/StemH 80\r/ItalicAngle 0\r/CapHeight 820\r/XHeight
574\r/Ascent 820\r/Descent 220\r/Leading 40\r/MaxWidth 1020\r/Av
gWidth 420\r>>\rendobj\r3 0 obj\r<<\r/Type /Pages\r/Count 1\r/Kids [7 0
R]\r/Resources <<\r/ProcSet [/PDF /Text /ImageB /ImageC /Ima
geI]\r/ColorSpace << /CS1 [/Pattern /DeviceGray] /CS2 [/Pattern
/DeviceRGB] >>\r/Font << /F8 8 0 R /F9 9 0 R /F10 10 0 R >>\r\r>>\r

\rendobj\r2 0 obj\r<<\r/Type /Catalog\r/Pages 3 0 R\r>>\rendobj\r1 0
obj\r<<\r/Title (Intuit_QBOB_Internal.pdf)\r/Producer (Amyuni
PDF Converter)\r/Version (Version 2.07c Pro - Intuit
Inc.)\r/CreationDate (19/6/2004 15:35:1)\r>>\rendobj\rxref\r0
14\r0000000000 6
5535 f \r0000006157 00000 n \r0000006108 00000 n \r0000005869 00000 n
\r0000000000 00000 n \r0000000017 00000 n \r0000001563 00000 n
\r0000001583 00000 n \r0000001862 00000 n \r0000003199 00000 n
\r0000004527 00000 n \r0000002942 00000 n \r0000004275 00000 n \r000
0005609 00000 n \rtrailer\r<<\r/Size 14\r/Root 2 0 R\r/Info 1 0
R\r>>\rstartxref\r6322\r%%EOF\r’,‘content-type: application/pdf; nam
e=“Estimate_17_from_XXXXXXXXXXX.pdf”\ncontent-disposition: attachment;
filename=“Estimate_17_from_XXXXXXXXX.pdf
”\nContent-Transfer-Encoding: base64\nContent-Length:
6680\n’,374,‘2004-06-19 19:36:55’);

What do I need to do to make this data Postgres-insert friendly?

Thanks

What do I need to do to make this data Postgres-insert friendly?

http://www.rot13.org/~dpavlin/sql.html

Andy Harrison