Re: how to extract data from bytea so it is be used in blob for mysql database

Поиск
Список
Период
Сортировка
От George Kao
Тема Re: how to extract data from bytea so it is be used in blob for mysql database
Дата
Msg-id 1B0DB83EE38C4B64A77806E7056E29C3@nitrex.com
обсуждение исходный текст
Ответ на Re: how to extract data from bytea so it is be used in blob for mysql database  (Raymond O'Donnell <rod@iol.ie>)
Список pgsql-general
The functions, encode, converts the binary string to HEX representation. It
does seem to work as mysql's blob accepts the HEX data representation. Any
program that you are aware of for dumping the data to the SQL script (i.e.
INSERT INTO ...) while having the option to convert those binary string to
hex?

-----Original Message-----
From: Raymond O'Donnell [mailto:rod@iol.ie]
Sent: Thursday, May 14, 2009 3:15 PM
To: george.kao@group-upc.com
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] how to extract data from bytea so it is be used in
blob for mysql database

On 14/05/2009 20:07, George Kao wrote:
> The data in escaped octal is not acceptable. Is there a way to dump
> the bytea from posgresql database in hex format? I think it is
> acceptable by

No, I'm fairly sure that you can't do it directly in the pg_dump output.
However, you could maybe use the functions here -

  http://www.postgresql.org/docs/8.3/static/functions-binarystring.html

- to write something that will output what you need.

Ray.

------------------------------------------------------------------
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland rod@iol.ie
Galway Cathedral Recitals: http://www.galwaycathedral.org/recitals
------------------------------------------------------------------


В списке pgsql-general по дате отправления:

Предыдущее
От: Raymond O'Donnell
Дата:
Сообщение: Re: how to extract data from bytea so it is be used in blob for mysql database
Следующее
От: "Turner, Ian"
Дата:
Сообщение: Re: Best way to monitor, control, or rewrite data definition commands?