Re: About large objects asynchronous and non-blocking support

Поиск
Список
Период
Сортировка
От Dmitriy Igrishin
Тема Re: About large objects asynchronous and non-blocking support
Дата
Msg-id CAAfz9KMKdTrA14yhZJj7t07iE7SZdX6kqi-aT_smXohve4jD9w@mail.gmail.com
обсуждение исходный текст
Ответ на Re: About large objects asynchronous and non-blocking support  (Giovanni Mascellani <g.mascellani@gmail.com>)
Список pgsql-hackers



2013/6/8 Giovanni Mascellani <g.mascellani@gmail.com>
Hi.

Il 05/06/2013 22:52, Dmitriy Igrishin ha scritto:
>> At the moment libpq doesn't seem to support asynchronous and
>> non-blocking support for large objects, in the style of
>> PQsendQuery/PQgetResult. This makes large objects hardly suited for
>> single-threaded programs based on some variant of select().
>>
> According to http://www.postgresql.org/docs/9.2/static/lo-funcs.html
> "There are server-side functions callable from SQL that correspond to each
> of
> the client-side functions". Hence, you can call these functions by using
> asynchronous API.

Thanks, I'll try this way (BTW, it may help to specify on the
documentation that lo_read and lo_write lose the "_"). I wonder whether
having to escape all the content for lowrite  can't have a negative
impact on performances. It shouldn't be too bad for my case, though.
You may avoid escaping bytea data by using PQsendPrepare,
PQsendQueryPrepared specifying binary data format.

--
// Dmitriy.

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

Предыдущее
От: David Johnston
Дата:
Сообщение: Re: Bad error message on valuntil
Следующее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: Bad error message on valuntil