Re: Record - Mailing list pgsql-general

From Aasmund Midttun Godal
Subject Re: Record
Date
Msg-id 20011024224111.1071.qmail@ns.krot.org
Whole thread Raw
In response to Re: Record  (wsheldah@lexmark.com)
List pgsql-general
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@lexmark.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.com@interlock.lexmark.com> on 10/24/2001
> 10:22:39 AM
>
> To:   Aasmund Midttun Godal <postgresql%envisity.com@interlock.lexmark.com>
> cc:   julio%bntsoft.com.br@interlock.lexmark.com,
>       pgsql-general%postgresql.org@interlock.lexmark.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[@]atentus.com>)
> Jajaja! Solo hablaba en serio!
>
>
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster

Aasmund Midttun Godal

aasmund@godal.com - http://www.godal.com/
+47 40 45 20 46

pgsql-general by date:

Previous
From: Keary Suska
Date:
Subject: Re: Solaris 2.6 support.
Next
From: "Dr. Evil"
Date:
Subject: Re: Disable Transaction - plans ?