Re: decoding BLOB's

Поиск
Список
Период
Сортировка
Искать
От
John R Pierce
Тема
Re: decoding BLOB's
Дата
Msg-id
56CB6383.7070507@hogranch.com
Ответ на
Re: decoding BLOB's (Joshua D. Drake)
Список
Дерево обсуждения
decoding BLOB's CS DBA <cs_dba@consistentstate.com>
Re: decoding BLOB's "Joshua D. Drake" <jd@commandprompt.com>
Re: decoding BLOB's John R Pierce <pierce@hogranch.com>
Re: decoding BLOB's Chris Mair <chris@1006.org>
On 2/22/2016 11:23 AM, Joshua D. Drake wrote:
Can someone point me in the right direction per how I would remove the
first 25 bytes and the last 2 bytes from a bytea column?

http://www.postgresql.org/docs/9.3/static/functions-binarystring.html

Substring might do it for you.

won't doing it in SQL still result in a BYTEA result which will be wrapped when dumped via COPY ?

instead, I think this needs to be done externally to sql, like by piping the resulting file through something like ...

tail -c +25 infile.dat | head -c -2 > outfile.dat
or doing something in perl or whatever.

-- 
john r pierce, recycling bits in santa cruz
В списке pgsql-general по дате отправления
От: Stephen Frost
Дата:
От: Seamus Abshere
Дата:
FAQ