Best Data type for Binary Data?

Started by Ketemaover 20 years ago2 messagesgeneral
Jump to latest
#1Ketema
ketema@gmail.com

Hi, I would like to store binary data from a tcpdump (libpcap) file in a
table. What is the best type to use? i have read posts saying lo, oid, and
bytea. Which one would be best for this scenario?

Thanks, ketema

#2Aaron Koning
aaronkoning@gmail.com
In reply to: Ketema (#1)
Re: Best Data type for Binary Data?

BYTEA is the easiest from my point of view. I like being able to treat my
binary data more like any other field (e.g. date, text, etc). Heres some
light reading on the BLOB/BYTEA debate:

http://search.postgresql.org/www.search?cs=utf-8&fm=on&st=20&dt=back&q=blob+bytea

Aaron

Show quoted text

On 1/5/06, Ketema Harris <ketema@gmail.com> wrote:

Hi, I would like to store binary data from a tcpdump (libpcap) file in a
table. What is the best type to use? i have read posts saying lo, oid, and
bytea. Which one would be best for this scenario?

Thanks, ketema