From: | Jan Wieck <JanWieck(at)Yahoo(dot)com> |
---|---|
To: | Jerome Alet <alet(at)unice(dot)fr> |
Cc: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: Storing image contents in TEXT fields |
Date: | 2001-06-27 15:17:28 |
Message-ID: | 200106271517.f5RFHSp18538@jupiter.us.greatbridge.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
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(at)Yahoo(dot)com #
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
From | Date | Subject | |
---|---|---|---|
Next Message | Jim | 2001-06-27 15:24:06 | Re: Text manipulation in SQL |
Previous Message | Tom Lane | 2001-06-27 14:07:52 | Re: Plsql Function with error: No space left on device. |