From: | Alex Pilosov <alex(at)pilosoft(dot)com> |
---|---|
To: | Aasmund Midttun Godal <postgresql(at)envisity(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Record |
Date: | 2001-10-25 01:42:28 |
Message-ID: | Pine.BSO.4.10.10110242142020.6144-100000@spider.pilosoft.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
No, you don't, just bind variable as SQL_BINARY, and it'll do the escaping
on its own. Search archives. :)
-alex
On Wed, 24 Oct 2001, Aasmund Midttun Godal wrote:
> It handles the unescaping, but you have to escape to update/insert, I use:
>
> s/([^\w])/sprintf("\\%03o", ord($1))/eg;
>
> On Wed, 24 Oct 2001 11:42:31 -0400, wsheldah(at)lexmark(dot)com wrote:
> >
> >
> > If you're using Perl and the DBD::Pg driver, then you can use bytea without
> > worrying about escaping anything, since the driver takes care of it.
> >
> >
> >
> >
> > Alvaro Herrera <alvherre%atentus(dot)com(at)interlock(dot)lexmark(dot)com> on 10/24/2001
> > 10:22:39 AM
> >
> > To: Aasmund Midttun Godal <postgresql%envisity(dot)com(at)interlock(dot)lexmark(dot)com>
> > cc: julio%bntsoft(dot)com(dot)br(at)interlock(dot)lexmark(dot)com,
> > pgsql-general%postgresql(dot)org(at)interlock(dot)lexmark(dot)com (bcc: Wesley
> > Sheldahl/Lex/Lexmark)
> > Subject: Re: [GENERAL] Record
> >
> >
> > On Tue, 23 Oct 2001, Aasmund Midttun Godal wrote:
> >
> > an image in a table you have 2 options:
> >
> > Third option is to encode the image (base64?) and then store as text.
> > It's probably slower (since you have to decode it everytime), uses much
> > more space, but you don't have to worry about escaping the byte
> > sequence.
> >
> > --
> > Alvaro Herrera (<alvherre[(at)]atentus(dot)com>)
> > Jajaja! Solo hablaba en serio!
> >
> >
> >
> >
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 4: Don't 'kill -9' the postmaster
>
> Aasmund Midttun Godal
>
> aasmund(at)godal(dot)com - http://www.godal.com/
> +47 40 45 20 46
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Mike Mascari | 2001-10-25 02:22:39 | Re: Disable Transaction - plans ? |
Previous Message | Tom Lane | 2001-10-25 01:29:36 | Re: Disable Transaction - plans ? |