Re: Need help importing dump with bytea into db

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Need help importing dump with bytea into db
Дата
Msg-id 14626.1344867809@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Need help importing dump with bytea into db  (Philippe Dirkse <philippe.dirkse@alten.nl>)
Список pgsql-novice
Philippe Dirkse <philippe.dirkse@alten.nl> writes:
> I have the strangest problem. Scenario: Server running postgresql 8.4.10, 32-bit Ubuntu, local machine running
postgresql9.1.4, 64-bit OSX Snow Leopard. I want to create a local copy of the database running on the server for
developmentpurposes, as the server database is 'live'. 

> So, on my Mac I use pg_dump to create a dump from the server database. This database contains one table that has a
byteacolumn which stores pictures (png,jpg). Examining the dump, I see this data is 'escaped' as octects for all
'non-readable'characters. Now, when I use psql (or pg_restore for that matter) to import the dump into my local
database,the bytea data is not 'unescaped' properly. It appears as if the characters for the string representation of
theactual bytes are returned.  

My first guess is that there's nothing actually wrong with the data, but
you're getting confused by the fact that 9.1 by default outputs bytea
data in hex rather than the traditional "escaped" format.  See the
bytea_output configuration parameter.

            regards, tom lane


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

Предыдущее
От: Philippe Dirkse
Дата:
Сообщение: Need help importing dump with bytea into db
Следующее
От: Michael Wood
Дата:
Сообщение: Re: how to get desired html format output?