Re: Handling Blobs with libpq

Поиск
Список
Период
Сортировка
От Doug McNaught
Тема Re: Handling Blobs with libpq
Дата
Msg-id m3fzpi7zk4.fsf@varsoon.wireboard.com
обсуждение исходный текст
Ответ на Handling Blobs with libpq  (Stéphane Pinel <spinel@noos.fr>)
Список pgsql-general
Stéphane Pinel <spinel@noos.fr> writes:

> What is the best approach to handle blobs with libpq ?
>
> I've read in documentation that there are 2 ways:
>
> 1- Bytea
> 2- Larges objects (lo_import)
>
> My main need is storing pictures (like Jpegs etc) or small blobs. Doc
> says that (2) is more
> appropriate but I need to work with blobs in memory, not from files.

You don't have to use lo_import()--you can write from memory to a large
object using lo_write(), and read an LO (or part of one) into memory
using lo_read().  See the documentation.

-Doug

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

Предыдущее
От: "Fernando Papa"
Дата:
Сообщение: using arrays as variable, not as field
Следующее
От: "Daniel R. Anderson"
Дата:
Сообщение: Re: PostgreSQL downloads compressed with bzip2 instead of