Re: storing PDFs

From: Leonel Nunez <lnunez(at)enelserver(dot)com>
To: Doug McNaught <doug(at)mcnaught(dot)org>
Cc: littlebutty <littlebutty(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: storing PDFs
Date: 2006-01-01 16:40:56
Message-ID: 43B80618.4000308@enelserver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Doug McNaught wrote:

>Leonel Nunez <lnunez(at)enelserver(dot)com> writes:
>
>
>
>>You can use ByteA but the size will be about 4 times bigger
>>
>>
>
>Are you sure? The intermediate form for bytea (escaped single-quoted
>strings) is pretty inefficient, but once in the database the data is
>stored as binary and can even be compressed.
>
>Plus, I'm pretty sure the protocol supports transmitting bytea fields
>as binary over the wire if your client software can handle it.
>
>-Doug
>
>
>
>

I've made 2 pg_dumps from 2 different databases , 1 from a ByteA
stored images and 1 from the same images but stored as Base64 on
varchar and the
sql file for byteA was 4 times bigger than the size of all the
images on the Filesystem
and the sql for varchar with base64 was about 30% bigger than the
size on the filesystem

but If the bytea is encoded only for dump and load and on the
database are same size as the original file
then that's great and my perception is wrong

I'll check that

Leonel

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tony Caduto 2006-01-01 16:44:03 Re: sending mail from Postgres
Previous Message Doug McNaught 2006-01-01 16:19:45 Re: storing PDFs