From: | Richard Huxton <dev(at)archonet(dot)com> |
---|---|
To: | "Timur V(dot) Irmatov" <itvthor(at)sdf(dot)lonestar(dot)org>, Jeff Davis <list-pgsql-general(at)empires(dot)org> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: BYTEA |
Date: | 2002-09-20 09:15:13 |
Message-ID: | 200209201015.14661.dev@archonet.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Friday 20 Sep 2002 9:46 am, Timur V. Irmatov wrote:
> Jeff!
>
> Friday, September 20, 2002, 1:24:28 PM, You wrote:
>
> JD> I don't really see a way postgres could do it any better, since the
> queries JD> and results are both strings, so there have to be rules about
> what a string JD> might include. Base64 works nicely because it's fairly
> compact, and all JD> "safe" text.
>
> Hm.. If i have a varchar field then if I want to insert a string
> some'tex\t into it, I quote it like that: 'some\'tex\\t' .. but if I
> want to insert the same into bytea field I must quote it more:
> 'some\\'tex\\\\' .. why ???
Because it *is* parsed twice IIRC (bear in mind I'm not a developer and I
haven't looked at the code yet).
The first parse gets it into the system *as a chunk of text*, so for varchar
there's nothing more to be done. If you're storing a bytea (or other) then it
needs to be converted to that form, i.e. parsed again.
- Richard Huxton
From | Date | Subject | |
---|---|---|---|
Next Message | Frank Joerdens | 2002-09-20 09:20:53 | Re: RES: PHP + PostgreSQL |
Previous Message | Frank Joerdens | 2002-09-20 08:53:24 | Re: RES: PHP + PostgreSQL |