Re: bytea and text

From: Jasen Betts <jasen(at)xnet(dot)co(dot)nz>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: bytea and text
Date: 2009-11-27 07:57:18
Message-ID: heo0ou$tvq$1@reversiblemaps.ath.cx
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On 2009-11-26, Jean-Yves F. Barbier <12ukwn(at)gmail(dot)com> wrote:
> 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,
>
> * using a TEXT column type, and store a Base64(picture) in it; it should
> take benefits of intrinsic compression (?).

use bytea and convert to/from base64 if you can't use the binary
interface and find the text interface inconvenient.

this will make the data over 1/3 bigger.

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Nathaniel Trellice 2009-11-27 11:04:21 How best to index foreign key for inner join
Previous Message Tom Lane 2009-11-27 06:49:39 Re: index speed-up and automatic tables/procedures creation