Re: bytea extraction

Поиск
Список
Период
Сортировка
Искать
От
Rich Harley
Тема
Re: bytea extraction
Дата
Msg-id
A396082A-E77A-4205-B33F-2DD9246A0DCD@scholarpack.com
Ответ на
Re: bytea extraction (Adrian Klaver)
Список
Дерево обсуждения
Re: bytea extraction Adrian Klaver <adrian.klaver@gmail.com>
Re: bytea extraction Rich Harley <richard@scholarpack.com>
Re: bytea extraction Adrian Klaver <adrian.klaver@gmail.com>
Re: bytea extraction Rich Harley <richard@scholarpack.com>
Great, thanks Adrian.

On 3 Feb 2014, at 18:07, Adrian Klaver  wrote:

> On 02/03/2014 09:59 AM, Rich Harley wrote:
>> Ah, I see. It’s postgres 9.1 and psycopg1 (through Zope 2.11) - an old one but we have found no need to upgrade as yet because we only use very simple data types.
>> 
>> When the data goes in it goes through psycopg.Binary(photo).
>> So it’s really the reverse of that I need.
> 
> I can't even find docs for psycopg1, so from the current documentation:
> 
> http://initd.org/psycopg/docs/faq.html?highlight=bytea
> 
> 
> Transferring binary data from PostgreSQL 9.0 doesn’t work.
> 
>    PostgreSQL 9.0 uses by default the “hex” format to transfer bytea data: the format can’t be parsed by the libpq 8.4 and earlier. The problem is solved in Psycopg 2.4.1, that uses its own parser for the bytea format. For previous Psycopg releases, three options to solve the problem are:
> 
>        set the bytea_output parameter to escape in the server;
>        execute the database command SET bytea_output TO escape; in the session before reading binary data;
>        upgrade the libpq library on the client to at least 9.0.
> 
> 
> 
> 
> 
> 
> -- 
> Adrian Klaver
> adrian.klaver@gmail.com


В списке psycopg по дате отправления
От: Adrian Klaver
Дата:
Сообщение: Re: bytea extraction
От: Mario Splivalo
Дата:
FAQ