Received: from smtp018.mail.yahoo.com (smtp018.mail.yahoo.com [216.136.174.115]) by postgresql.org (8.11.3/8.11.1) with SMTP id f5RFBNa32256 for ; Wed, 27 Jun 2001 11:11:23 -0400 (EDT) (envelope-from janwieck@yahoo.com) Received: from jupiter.us.greatbridge.com (65.196.69.55) by smtp.mail.vip.sc5.yahoo.com with SMTP; 27 Jun 2001 15:11:17 -0000 X-Apparently-From: Received: (from wieck@localhost) by jupiter.us.greatbridge.com (8.11.2/8.11.2) id f5RFHSp18538; Wed, 27 Jun 2001 11:17:28 -0400 From: Jan Wieck Message-Id: <200106271517.f5RFHSp18538@jupiter.us.greatbridge.com> Subject: Re: Storing image contents in TEXT fields In-Reply-To: <20010627001110.A1279@nordine.ateur> from Jerome Alet at "Jun 27, 2001 00:11:10 am" To: Jerome Alet Date: Wed, 27 Jun 2001 11:17:28 -0400 (EDT) CC: pgsql-sql@postgresql.org X-Mailer: ELM [version 2.4ME+ PL68 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Archive-Number: 200106/433 X-Sequence-Number: 3730 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. If you can't upgrade to 7.1.x, you'll have to slice and reassemble it yourself. 7.0 doesn't have TOAST. Jan -- #======================================================================# # It's easier to get forgiveness for being wrong than for being right. # # Let's break this rule - forgive me. # #================================================== JanWieck@Yahoo.com # _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com