Ok, I'll consider that approach, but what about the binary types? Is there a difference between them? lo, bytea, or oid? What are their strengths an weaknesses, what exactly do they mean?
You can also use the TEXT data type.Just convert your binary data to base64 and write it to a field in your database like you would any other type of text.This method takes up more space than the other methods but it avoids some of the headaches of dealing with bytea.
CREATE OR REPLACE FUNCTION SAVE_TCP_DUMP(TEXT) RETURNS VOID AS $$
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? Depending on the type can a sample insert and select statement be given as well?