Re: bytea and text

Поиск
Список
Период
Сортировка
От Brian Modra
Тема Re: bytea and text
Дата
Msg-id 5a9699850911260652j6c9d23b5nf5d5f587db4d4130@mail.gmail.com
обсуждение исходный текст
Ответ на bytea and text  ("Jean-Yves F. Barbier" <12ukwn@gmail.com>)
Список pgsql-novice
2009/11/26 Jean-Yves F. Barbier <12ukwn@gmail.com>:
> Hi list,
>
> I'm asking myself what solution for storing pictures is the best:
>
> * using a BYTEA column type, and having no intrinsic compression gain
>   because a picture it almost every time already compressed,

I have not looked into what the internal representation is with BYTEA,
but if it is binary, then it will be more efficient than text and
base64.

> * using a TEXT column type, and store a Base64(picture) in it; it should
>   take benefits of intrinsic compression (?).

One disadvantage of BYTEA is that if you use the escaped format to
insert, then you can hit the limit of SQL size. This limit would not
be quite as tight if you use base64.

If this is the case though, I wonder why base64 isn't an option for
the escaped syntax for BYTEA?

>
> JY
> --
>
> --
> Sent via pgsql-novice mailing list (pgsql-novice@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-novice
>



--
Brian Modra   Land line: +27 23 5411 462
Mobile: +27 79 69 77 082
5 Jan Louw Str, Prince Albert, 6930
Postal: P.O. Box 2, Prince Albert 6930
South Africa
http://www.zwartberg.com/

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

Предыдущее
От: "Jean-Yves F. Barbier"
Дата:
Сообщение: bytea and text
Следующее
От: Tom Lane
Дата:
Сообщение: Re: bytea and text