text field data transfer? - Mailing list pgsql-general

From
Subject text field data transfer?
Date
Msg-id Pine.LNX.4.10.10002151940520.6138-100000@picasso.realtyideas.com
Whole thread Raw
In response to Re: [GENERAL] Simulating an outer join  (Sarah Officer <officers@aries.tucson.saic.com>)
List 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 by date:

Previous
From: Marc Tardif
Date:
Subject: splitting tables into db's
Next
From: "Floyd Shackelford"
Date:
Subject: syntax error 2334 : parse error