Copying bytea data out via pgsql

Поиск
Список
Период
Сортировка
От John Wells
Тема Copying bytea data out via pgsql
Дата
Msg-id 50609.66.192.236.118.1122037306.squirrel@devsea.com
обсуждение исходный текст
Ответы Re: Copying bytea data out via pgsql  (Leonel Nunez <lnunez@enelserver.com>)
Список pgsql-general
Guys,

I have a number of jpegs and tiffs that are stored in a bytea field in a
PostgreSQL database by a Java program using Hibernate.

I need to copy these out to a flat file via pgsql for viewing, etc.  I've
tried

psql -c 'select binarydata_field from my_image_table where id=1' mydb >
flatfile

but although that seems to provide the data it does not seem to pull it in
a valid image format.  Is there some special handling I need to do here?

Thanks!
John


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

Предыдущее
От: Michael Fuhr
Дата:
Сообщение: Re: problem casting varchar to inet
Следующее
От: Roman Neuhauser
Дата:
Сообщение: Re: problem casting varchar to inet