Re: BYTEA

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: BYTEA
Дата
Msg-id 200209201015.14661.dev@archonet.com
обсуждение исходный текст
Ответ на Re: BYTEA  ("Timur V. Irmatov" <itvthor@sdf.lonestar.org>)
Список 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

В списке pgsql-general по дате отправления:

Предыдущее
От: Frank Joerdens
Дата:
Сообщение: Re: RES: PHP + PostgreSQL
Следующее
От: Yury Bokhoncovich
Дата:
Сообщение: Re: missed features and unhappy changes when pg 7.1->7.2