Re: store in bytea - Mailing list pgsql-general

From Alex Pilosov
Subject Re: store in bytea
Date
Msg-id Pine.BSO.4.10.10108241516380.10344-100000@spider.pilosoft.com
Whole thread Raw
In response to Re: store in bytea  ("Ben-Nes Michael" <miki@canaan.co.il>)
List pgsql-general
What are you using to develop? If perl, DBD::Pg will escape/unescape bytea
data after 0.98 version. (Unescaping is automatic, to escape, you need to
do bind(.., SQL_BINARY)).

-alex

On Fri, 24 Aug 2001, Ben-Nes Michael wrote:

> But Ill have to add double slashes and even more importent I will have to
> unescape every binary data going out of the server, which mean in one of my
> aplication all the Images.
>
> Wont this action be much more heavey then the way I used untill now with
> MySQL (blob) ?
> addslash on insert and ordinary select for output.
>
> Does any one here save his website images on DB and retrive them out on his
> web page ?
>
> > "Ben-Nes Michael" <miki@canaan.co.il> writes:
> > > On the theoretical issue, can I use TEXT field to store binary ?
> >
> > TEXT will not handle null (zero) bytes.  If you are using a multibyte
> > character set, it will likely also do the wrong thing with byte
> > sequences that are illegal or incomplete multibyte characters.
> >
> > Use BYTEA if you want to store arbitrary byte sequences --- that's what
> > it's for.
> >
> > regards, tom lane
> >
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
>
>


pgsql-general by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: embedded SQL cursos declare fails
Next
From: jdassen@cistron.nl (J.H.M. Dassen (Ray))
Date:
Subject: Re: libpq