Re: bytea on windows perl client

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: bytea on windows perl client
Дата
Msg-id 14471.1026922139@sss.pgh.pa.us
обсуждение исходный текст
Ответ на bytea on windows perl client  (James Orr <james@lrgmail.com>)
Ответы Re: bytea on windows perl client
Список pgsql-interfaces
James Orr <james@lrgmail.com> writes:
> I have some code which runs fine on linux.  It simply pulls a png from a bytea 
> column and displays it.

> Now I need to get it running on windows.  We have installed ActiveState perl 
> with the DBI module and downloaded and installed the DBD-Pg binary.  
> Connections to the database are working fine, but the png file is getting 
> corrupted.

> Anybody know the work-around?

I'd bet money that the problem is a newline conversion issue --- you
could check by noticing whether the PNG signature (first 8 bytes of the
file) comes back correctly or not.  The signature is designed to get
changed if it's fed through any of the standard kinds of newline
conversion (\n -> \r\n, for example).

Not that this gives any immediate suggestion for a fix, but
understanding what is happening is always a good first step.
        regards, tom lane


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

Предыдущее
От: James Orr
Дата:
Сообщение: bytea on windows perl client
Следующее
От: James Orr
Дата:
Сообщение: Re: bytea on windows perl client