Received: from spider.pilosoft.com (p55-222.acedsl.com [160.79.55.222]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f5QMOOa95900 for ; Tue, 26 Jun 2001 18:24:24 -0400 (EDT) (envelope-from alex@pilosoft.com) Received: from localhost (alexmail@localhost) by spider.pilosoft.com (8.9.3/8.9.3) with ESMTP id SAA07344; Tue, 26 Jun 2001 18:34:32 -0400 (EDT) Date: Tue, 26 Jun 2001 18:34:32 -0400 (EDT) From: Alex Pilosov To: Jerome Alet cc: pgsql-sql@postgresql.org Subject: Re: Storing image contents in TEXT fields In-Reply-To: <20010627001110.A1279@nordine.ateur> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Archive-Number: 200106/425 X-Sequence-Number: 3722 You must use type 'bytea'. When you insert data, you must escape them like this: '\001\002\\000' note the double-backslash for null byte. On Wed, 27 Jun 2001, 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. > > Thanks in advance for any help. > > bye, > > Jerome Alet > > ---------------------------(end of broadcast)--------------------------- > TIP 5: Have you checked our extensive FAQ? > > http://www.postgresql.org/users-lounge/docs/faq.html > >