1

I have a oracle database holding about 2TB of data that I have to migrate to postgreSQL. I'm learning onCOPY command of pgsql and pgloader.

The problem is....

  1. copy command has delimeter option which Specifies the character that separates columns within each row (line) of the file. This must be a single one-byte character according to manual. What if I need secondary delimeter(like enclosed by option that oracle has)?

  2. There is no update since 2010-04 on [http://pgloader.projects.postgresql.org]... so I don't think it's recommended way...

Are there another options I'm missing?

1
  • Just because something isn't constantly updated doesn't mean there's anything wrong with it. I haven't used pgloader myself as I never need to load huge piles of data, but I haven't seen any signs it isn't suitable. Commented Oct 8, 2012 at 8:24

2 Answers 2

2

I think You should write some program in any lang or use http://www.enterprisedb.com/solutions/oracle-migration-assessment

Sign up to request clarification or add additional context in comments.

Comments

1

A couple points. First you can use COPY with CSV formats so if you are worried about handling of commas for example, you can just copy as CSV and let the quoting rules handle that. CSV is widely supported as a data export format anyway and so that's probably the best way to handle that case.

Secondly your delimiter can be escaped by a backslash if you need it.

3 Comments

[Secondly your delimiter can be escaped by a backslash if you need it.]<-- I can't understand what exactly I have to do.
Then you can s/,/\\,/g on your field in order toe scape correctly as you export. CSV is probably more trustworthy since it is a general de facto standard.
Note that CSV supports quoting too, as per Oracle's ENCLOSED BY.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.