X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 63741D8834 for ; Tue, 6 Sep 2005 17:21:54 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 71903-04 for ; Tue, 6 Sep 2005 20:21:50 +0000 (GMT) Received: from spatula.dreamhost.com (spatula.dreamhost.com [66.33.205.9]) by svr1.postgresql.org (Postfix) with ESMTP id 7C6B0D86EE for ; Tue, 6 Sep 2005 17:21:50 -0300 (ADT) Received: from [192.168.1.101] (stmnca-cuda2-new-70-34-104-163.vnnyca.adelphia.net [70.34.104.163]) by spatula.dreamhost.com (Postfix) with ESMTP id 02FA617D040; Tue, 6 Sep 2005 13:21:52 -0700 (PDT) Message-ID: <431DFA67.4060308@oss.minimetria.com> Date: Tue, 06 Sep 2005 13:21:59 -0700 From: Leon Torres User-Agent: Debian Thunderbird 1.0.6 (X11/20050802) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Tom Lane Cc: pgsql-sql@postgresql.org Subject: Re: Recommendation on bytea or blob for binary data like images References: <42165.70.34.104.163.1125688546.squirrel@webmail.oss.minimetria.com> <17794.1125693189@sss.pgh.pa.us> In-Reply-To: <17794.1125693189@sss.pgh.pa.us> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 required=5 tests=[none] X-Spam-Level: X-Archive-Number: 200509/63 X-Sequence-Number: 22610 Thanks for the quick response. We will be using bytea from now on. :-) - Leon Tom Lane wrote: >leon@oss.minimetria.com writes: > > >>Hi, I'd like to know what the official recommendation is on which binary >>datatype to use for common small-binary size use. >> >> > >If bytea will work for you, it's definitely the thing to use. The only >real drawback to bytea is that there's currently no API to read and >write bytea values in a streaming fashion. If your objects are small >enough that you can load and store them as units, bytea is fine. > >BLOBs, on the other hand, have a number of drawbacks --- hard to dump, >impossible to secure, etc. > > regards, tom lane > > >