text field data transfer?
От | |
---|---|
Тема | text field data transfer? |
Дата | |
Msg-id | Pine.LNX.4.10.10002151940520.6138-100000@picasso.realtyideas.com обсуждение исходный текст |
Ответ на | Re: [GENERAL] Simulating an outer join (Sarah Officer <officers@aries.tucson.saic.com>) |
Список | pgsql-general |
I need to transfer data from pg to m$sql. m$sql has bcp (like pg's copy). bcp use delimiter. there are 4 ways 1) use pg's copy then m$sql's bcp: bcp does not recognize null. so, I have to use pg's copy with null as '' (BTW, it does not work in 6.5.1, right?) a more serious problem is that text field usually contains ugly-dirty charactors, so, what is the safe delimiter? -- the key here is that delimiter approach does not escape within the content (for speed). 2) to solve that headache, I try to use "pg_dump -D" . however, pg put a lot of escape there (e.g. \015 ). also, int8 can not be used here. -- I rechecked the design, and change it to int4 and then dump it :-) more seriously, m$sql is strangely sensitive to the word "exit" (quotation mark not included) within the sql single quotation mark! m$shit! 3) dynamically connect two db. using perl. or, if can not connected directly, use perl write a "pg_dump-D-like" program. 4) bcp can use fix-length format. However, seems pg's copy can not. of course, I can write a perl to do that. but text field can not have fixed length! Do I have to use 3) ? is there a short cut?
В списке pgsql-general по дате отправления: