Re: bytea and text

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Jean-Yves F(dot) Barbier" <12ukwn(at)gmail(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: bytea and text
Date: 2009-11-26 15:58:01
Message-ID: 2590.1259251081@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

"Jean-Yves F. Barbier" <12ukwn(at)gmail(dot)com> writes:
> 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,

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

At best, the compression would get rid of the overhead you added by
converting to base64. It probably wouldn't completely succeed at that,
though, meaning the second alternative is always a loser.

regards, tom lane

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Jean-Yves F. Barbier 2009-11-26 16:12:31 Re: bytea and text
Previous Message Brian Modra 2009-11-26 14:52:15 Re: bytea and text