Re: storing PDFs - Mailing list pgsql-general

From Leonel Nunez
Subject Re: storing PDFs
Date
Msg-id 43B80618.4000308@enelserver.com
Whole thread Raw
In response to Re: storing PDFs  (Doug McNaught <doug@mcnaught.org>)
Responses Re: storing PDFs
List pgsql-general
Doug McNaught wrote:

>Leonel Nunez <lnunez@enelserver.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


pgsql-general by date:

Previous
From: Doug McNaught
Date:
Subject: Re: storing PDFs
Next
From: Martijn van Oosterhout
Date:
Subject: Re: bit/integer operations in postgres