X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id AF505D1B173 for ; Thu, 3 Jun 2004 04:19:10 -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 21738-01 for ; Thu, 3 Jun 2004 07:19:11 +0000 (GMT) Received: from anchor-post-35.mail.demon.net (anchor-post-35.mail.demon.net [194.217.242.85]) by svr1.postgresql.org (Postfix) with ESMTP id A309AD1B16B for ; Thu, 3 Jun 2004 04:19:08 -0300 (ADT) Received: from mwynhau.demon.co.uk ([193.237.186.96] helo=mainbox.archonet.com) by anchor-post-35.mail.demon.net with esmtp (Exim 3.35 #1) id 1BVmVJ-000GLg-0Z; Thu, 03 Jun 2004 08:19:09 +0100 Received: from [192.168.1.17] (client17.archonet.com [192.168.1.17]) by mainbox.archonet.com (Postfix) with ESMTP id 713901764D; Thu, 3 Jun 2004 08:19:07 +0100 (BST) Message-ID: <40BED0EB.8060303@archonet.com> Date: Thu, 03 Jun 2004 08:19:07 +0100 From: Richard Huxton User-Agent: Mozilla Thunderbird 0.6 (X11/20040502) X-Accept-Language: en-us, en MIME-Version: 1.0 To: beyaNet Consultancy Cc: pgsql-sql@postgresql.org Subject: Re: bytea or blobs? References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Archive-Number: 200406/18 X-Sequence-Number: 17963 beyaNet Consultancy wrote: > Hi, > what I am trying to do is to be able to store images in my database. > What I wanted to know is this: > > 1. Would it be better to have the image field type as a bytea or a blob? > I have heard it mentioned that bytea would be better as doing data dumps > would also insure that the image was saved as well! > > 2. Would it be better to make reference to mp3 files (i.e. storing the > address of the image /images/*.jpg) or is it feasible to store the mp3 > in the database as bytea or blobs as well? Depends on the precise details of your situation. Check the mailing-list archives (this list and general would be a good start) for plenty of discussion on these. -- Richard Huxton Archonet Ltd