pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alex Pilosov <alex@pilosoft.com>
To: Jerome Alet <alet@unice.fr>
Cc: pgsql-sql@postgresql.org
Subject: Re: Storing image contents in TEXT fields
Date: Tue, 26 Jun 2001 18:34:32 -0400 (EDT)
Message-ID: <Pine.BSO.4.10.10106261833430.21119-100000@spider.pilosoft.com> (raw)
In-Reply-To: <20010627001110.A1279@nordine.ateur>

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
> 
> 




view thread (5+ messages)  latest in thread

Message-ID: <Pine.BSO.4.10.10106261833430.21119-100000@spider.pilosoft.com>
Permalink:  ../Pine.BSO.4.10.10106261833430.21119-100000@spider.pilosoft.com/
Also on:    postgresql.org/message-id/Pine.BSO.4.10.10106261833430.21119-100000@spider.pilosoft.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: alex@pilosoft.com, alet@unice.fr
  Subject: Re: Storing image contents in TEXT fields
  In-Reply-To: <Pine.BSO.4.10.10106261833430.21119-100000@spider.pilosoft.com>
  References: <20010627001110.A1279@nordine.ateur> <Pine.BSO.4.10.10106261833430.21119-100000@spider.pilosoft.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox