Re: Storing image contents in TEXT fields - Mailing list pgsql-sql

From Alex Pilosov
Subject Re: Storing image contents in TEXT fields
Date
Msg-id Pine.BSO.4.10.10106261833430.21119-100000@spider.pilosoft.com
Whole thread Raw
In response to Storing image contents in TEXT fields  (Jerome Alet <alet@unice.fr>)
List pgsql-sql
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
> 
> 



pgsql-sql by date:

Previous
From: Jie Liang
Date:
Subject: how to limit user to open another session
Next
From: Craig Longman
Date:
Subject: strange plan