Re: BYTEA or LO?

Поиск
Список
Период
Сортировка
От ktm@rice.edu
Тема Re: BYTEA or LO?
Дата
Msg-id 20110531184002.GF8700@staff-mud-56-27.rice.edu
обсуждение исходный текст
Ответ на BYTEA or LO?  ("Jean-Yves F. Barbier" <12ukwn@gmail.com>)
Ответы Re: BYTEA or LO?  ("Jean-Yves F. Barbier" <12ukwn@gmail.com>)
Список pgsql-novice
On Tue, May 31, 2011 at 07:09:23PM +0200, Jean-Yves F. Barbier wrote:
> Hi list,
>
> I need to read/write pictures to my DB and I wonder which column type
> would be the best? (and DON'T feed the troll: I won't put them onto the FS),
> client will be written in Python.
>
> I formerly tested BYTEA (7.dontremember) and found that I needed to transcode
> my pictures into Base64 format to be able to do so (long and add 33% to the
> size); this is what I'd like to avoid.
>

That is needed to use the non-binary API. You can also use hex encoding starting
with 9.0, I think. The data is stored in binary internally so you should not get
a 33% bump in size. If you use the binary API, you can avoid the hex/base64
encoding pass as well.

Regards,
Ken

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

Предыдущее
От: "Jean-Yves F. Barbier"
Дата:
Сообщение: BYTEA or LO?
Следующее
От: "Jean-Yves F. Barbier"
Дата:
Сообщение: Re: BYTEA or LO?