Re: [PATCHES] PQescapeBytea documentation patch

Поиск
Список
Период
Сортировка
От Joe Conway
Тема Re: [PATCHES] PQescapeBytea documentation patch
Дата
Msg-id 3BFBDEA9.3070703@home.com
обсуждение исходный текст
Ответ на Re: [PATCHES] PQescapeBytea documentation patch  (Patrick Welche <prlw1@newn.cam.ac.uk>)
Список pgsql-interfaces
Patrick Welche wrote:

> This makes me wonder: should libpq contain a function to do the opposite
> too? eg.
> 
> string=GetValue(from a bytea type column)
> PQunescapeBytea(string, some buffer, buffer's size)
> 
> - or is there already another way of doing it?
> 
> It seems to me that anyone using bytea with libpq will end up having
> to reinvent this wheel. (Something worthy of being knocked up in my
> Copious Free Time (tm))

I thought about that, but did not write it for a couple of reasons:

First, there wasn't a strong consensus that this type of function 
belonged as part of libpq in the first place, so I didn't want to push 
my luck ;-)

Second, at least in my current work, I'm using binary cursors, in which 
case no unescaping is necessary.

I do agree that a standard bytea unescape function should be available 
in the client library somewhere. Maybe for 7.3 . . .

Joe



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

Предыдущее
От: Patrick Welche
Дата:
Сообщение: Re: [PATCHES] PQescapeBytea documentation patch
Следующее
От: Serafim Dahl
Дата:
Сообщение: Re: What front end are people using?