Re: bytea extraction

Поиск
Список
Период
Сортировка
От Adrian Klaver
Тема Re: bytea extraction
Дата
Msg-id 52EFD7E5.5070301@gmail.com
обсуждение исходный текст
Ответ на bytea extraction  (Rich Harley <richard@scholarpack.com>)
Ответы Re: bytea extraction
Список psycopg
On 02/03/2014 09:50 AM, Rich Harley wrote:
> How do I grab a bytea object stored in a postgres database and write it to the filesystem?
>
> Say I have a .jpeg stored in a table called pictures. I want to extra that object (select picture from pictures),
thenwrite it to a file called picture.jpg through the use of a python script. 
> I have tried several ways but the end file is always messed up and not the original picture.
> Any pointers?

Well the default format for bytea has changed with Postgres versions and
how Psycopg handles same has changed over time. So to begin to answer
this we will need to know what versions of Postgres and psycopg2 you are
using?

>
> Thanks
> Rich
>



--
Adrian Klaver
adrian.klaver@gmail.com


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