Received: from cortex.unice.fr (cortex.unice.fr [134.59.53.1]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f5RIHEa22424 for ; Wed, 27 Jun 2001 14:17:15 -0400 (EDT) (envelope-from alet@unice.fr) Received: from nordine.ateur (adp-21.unice.fr [134.59.69.30]) by cortex.unice.fr (8.8.5/8.8.5) with ESMTP id UAA17579; Wed, 27 Jun 2001 20:16:59 +0200 Received: from jerome by nordine.ateur with local (Exim 3.12 #1 (Debian)) id 15FJQH-00008f-00; Wed, 27 Jun 2001 19:48:17 +0200 Date: Wed, 27 Jun 2001 19:48:17 +0200 From: Jerome Alet To: Jan Wieck Cc: pgsql-sql@postgresql.org Subject: Re: Storing image contents in TEXT fields Message-ID: <20010627194817.A527@nordine.ateur> References: <20010627001110.A1279@nordine.ateur> <200106271517.f5RFHSp18538@jupiter.us.greatbridge.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii User-Agent: Mutt/1.0.1i In-Reply-To: <200106271517.f5RFHSp18538@jupiter.us.greatbridge.com>; from JanWieck@yahoo.com on Wed, Jun 27, 2001 at 11:17:28AM -0400 X-Archive-Number: 200106/435 X-Sequence-Number: 3732 On Wed, Jun 27, 2001 at 11:17:28AM -0400, Jan Wieck wrote: > Jerome Alet wrote: > > Hi, > > > > I wanted to know if it's possible to store an image content in a TEXT field, > > or if another type is needed (in this case, then which one ?). > > > > I don't want to use BLOBs, because I modify an existing application > > which also works with MySQL, and I can't update to postgresql-7.1.x > > (I don't admin this server) > > > > in a TEXT field the image seems to be truncated at the first nul byte. > > To have the highest portability across ALL databases, you > might be best off by converting it to/from base64 or similar > in the client application and store the string in a text or > varchar attribute. I think that I'll modify the app anyway, since I fear to hit the tuple max size with some postgresql versions. I think it's better to store images outside the database, but the original app developper didn't seem to think the same ;-) bye, and thanks to all Jerome Alet