bytea extraction - Mailing list psycopg

From Rich Harley
Subject bytea extraction
Date
Msg-id 9D8BA8C6-5531-483F-943C-1B2649CA61C1@scholarpack.com
Whole thread Raw
Responses Re: bytea extraction  (Adrian Klaver <adrian.klaver@gmail.com>)
List psycopg
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), then
writeit 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?

Thanks
Rich

On 8 Jan 2014, at 13:20, psycopg-owner@postgresql.org wrote:

> Message Digest
> Volume 1 : Issue 248 : "index" Format
>
> Messages in this Issue:
>  201401/2  : Psycopg 2.5.2 released



psycopg by date:

Previous
From: Daniele Varrazzo
Date:
Subject: Psycopg 2.5.2 released
Next
From: Adrian Klaver
Date:
Subject: Re: bytea extraction