Discussion:
[mdb-dev] Command line option to suppress binary data
Alfonso Muñoz-Pomer Fuentes
2012-12-03 17:15:35 UTC
Permalink
Hi again.

In the database we’re migrating from Access to PostgreSQL we have some
fields which contain binary data. They’re used for replication so they
can be safely ignored for the migration process. The issue is that there
are certain rows in which these binary fields may contain escape
sequences which break the import to PostgreSQL. I’ve added a command
line option (-B) to skip binary data with blank fields.

I don’t know if this is a known issue and if such a workaround would be
welcome.
--
Alfonso Muñoz-Pomer Fuentes
Johann Heinrich von Thünen-Institut
Bundesforschungsinstitut für Ländliche Räume, Wald und Fischerei
Institut für Forstgenetik
Sieker Landstrasse 2
22927 Grosshansdorf

Telefon: +49 (0)4102/696-145
Fax: +49 (0)4102/696-200
Email: ***@vti.bund.de
Web: http://www.vti.bund.de
Nirgal
2012-12-05 14:09:23 UTC
Permalink
I added a simmilar option in repository last Sunday (!)

Source is available at:
https://github.com/brianb/mdbtools/archive/master.tar.gz

You can now use -b strip to remove the binary data.

Also, I could export the binary data into a postgres database using octal encoding, with new option -b octal.
I then used psql COPY command to import the data, but somehow, I had to replace \ by \\ in the csv file first (sed -e s/\\/\\\\/g)

See existing bug repport at:
https://github.com/brianb/mdbtools/issues/16
https://bugs.launchpad.net/ubuntu/+source/mdbtools/+bug/390730

Cheers
Post by Alfonso Muñoz-Pomer Fuentes
Hi again.
In the database we’re migrating from Access to PostgreSQL we have some
fields which contain binary data. They’re used for replication so they
can be safely ignored for the migration process. The issue is that there
are certain rows in which these binary fields may contain escape
sequences which break the import to PostgreSQL. I’ve added a command
line option (-B) to skip binary data with blank fields.
I don’t know if this is a known issue and if such a workaround would be
welcome.
Alfonso Muñoz-Pomer Fuentes
2012-12-05 16:03:20 UTC
Permalink
Thanks! I’ve already pulled from the Github repo and the code I added
was pretty much the same ;)

Great work. I’ll let you know how the octal thing works for testing
purposes. I pretty much settled on discarding the replication fields,
though.

Regards.
Post by Nirgal
I added a simmilar option in repository last Sunday (!)
https://github.com/brianb/mdbtools/archive/master.tar.gz
You can now use -b strip to remove the binary data.
Also, I could export the binary data into a postgres database using octal encoding, with new option -b octal.
I then used psql COPY command to import the data, but somehow, I had to replace \ by \\ in the csv file first (sed -e s/\\/\\\\/g)
https://github.com/brianb/mdbtools/issues/16
https://bugs.launchpad.net/ubuntu/+source/mdbtools/+bug/390730
Cheers
Post by Alfonso Muñoz-Pomer Fuentes
Hi again.
In the database we’re migrating from Access to PostgreSQL we have some
fields which contain binary data. They’re used for replication so they
can be safely ignored for the migration process. The issue is that there
are certain rows in which these binary fields may contain escape
sequences which break the import to PostgreSQL. I’ve added a command
line option (-B) to skip binary data with blank fields.
I don’t know if this is a known issue and if such a workaround would be
welcome.
------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
mdbtools-dev mailing list
https://lists.sourceforge.net/lists/listinfo/mdbtools-dev
--
Alfonso Muñoz-Pomer Fuentes
Johann Heinrich von Thünen-Institut
Bundesforschungsinstitut für Ländliche Räume, Wald und Fischerei
Institut für Forstgenetik
Sieker Landstrasse 2
22927 Grosshansdorf

Telefon: +49 (0)4102/696-145
Fax: +49 (0)4102/696-200
Email: ***@vti.bund.de
Web: http://www.vti.bund.de
Continue reading on narkive:
Search results for '[mdb-dev] Command line option to suppress binary data' (Questions and Answers)
43
replies
Do they have a yahoo Answers where you live?
started 2006-09-14 15:54:56 UTC
polls & surveys
Loading...