From: | "George Kao" <george(dot)kao(at)group-upc(dot)com> |
---|---|
To: | "'Allan Kamau'" <allank(at)sanbi(dot)ac(dot)za>, "'Postgres-General'" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: how to extract data from bytea so it is be used in blob for mysql database |
Date: | 2009-05-14 15:36:53 |
Message-ID: | 8900E491CD2A4975A01C55012E60947C@nitrex.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
I have tried to pg_dump only one single table with bytea field and the
result is the same when I come to restore with mysql.
-----Original Message-----
From: Allan Kamau [mailto:allank(at)sanbi(dot)ac(dot)za]
Sent: Thursday, May 14, 2009 11:15 AM
To: Postgres-General
Cc: George Kao
Subject: Re: [GENERAL] how to extract data from bytea so it is be used in
blob for mysql database
Hi George,
This is my guess to the cause of the problem (I could be wrong).
You edited the pg_dump generated sql file to suit to suit the requirements
of your target server (MySQL), during this edition, your editor may have
inserted line terminators where it found long sentences, this long sentences
may have been the contents of your bytea column(s) thereby changing the data
of the bytea column(s).
Allan.
On Thu, May 14, 2009 at 3:18 PM, George Kao <george(dot)kao(at)group-upc(dot)com>
wrote:
> The platform is WinXP. I have database with fields of bytea in Posgresql
> 8.1. The objective was to transfer the entire databasae (schema + data) >
to Mysql 5.1. I used the pg_dump from Posgresql 8.1 to extract the > schema
and data. With some minor touch-up of the sql script generated, I > am able
to run the script with mysql.exe to store the database except > for the
bytea data...
>
>
> -----Original Message-----
> From: pgsql-general-owner(at)postgresql(dot)org
> [mailto:pgsql-general-owner(at)postgresql(dot)org] On Behalf Of Raymond >
O'Donnell > Sent: Wednesday, May 13, 2009 5:52 PM > To: George Kao > Cc:
pgsql-general(at)postgresql(dot)org > Subject: Re: [GENERAL] how to extract data
from bytea so it is be used > in blob for mysql database > > On
13/05/2009 21:56, George Kao wrote:
>> I used pg_dump to extract the data from my database with bytea fields
>> (having pictures) in plain text format. I encoutered some problems to >>
restore those bytea data to the blobs field in a Mysql database. Any >
advice?
>
> A bit more detail would be nice.... we're only guessing otherwise.
>
> - Platform(s)?
> - Version?
> - Commands executed?
> - Error messages?
> - Log entries?
> - ....
>
> Ray.
>
> ------------------------------------------------------------------
> Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland >
rod(at)iol(dot)ie Galway Cathedral Recitals:
> http://www.galwaycathedral.org/recitals
> ------------------------------------------------------------------
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org) To >
make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org) > To
make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>
From | Date | Subject | |
---|---|---|---|
Next Message | wickro | 2009-05-14 15:47:24 | Re: work_mem greater than 2GB issue |
Previous Message | Tom Lane | 2009-05-14 15:30:35 | Re: Failure during initdb - creating dictionaries ... FATAL: could not access file "$libdir/libdict_snowball": No such file or directory |