Re: bytea vs. pg_dump - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: bytea vs. pg_dump
Date
Msg-id 4A0174BC.3010106@dunslane.net
Whole thread Raw
In response to Re: bytea vs. pg_dump  (Bernd Helmle <mailings@oopsware.de>)
Responses Re: bytea vs. pg_dump  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers

Bernd Helmle wrote:
> --On Dienstag, Mai 05, 2009 16:57:50 -0400 Andrew Dunstan 
> <andrew@dunslane.net> wrote:
>
>> Hex will already provide some space savings over our current encoding
>> method for most byteas anyway. It's not like we'd be making things less
>> efficient space-wise. And in compressed archives the space difference is
>> likely to dissolve to not very much, I suspect.
>
> I'm dumb: I don't understand why a hex conversion would be 
> significantly faster than what we have now?
>

Quite apart from anything else you would not need the current loop over 
the bytea input to calculate the result length - in hex it would just be 
the input length * 2.

cheers

andrew


pgsql-hackers by date:

Previous
From: Bernd Helmle
Date:
Subject: Re: Values of fields in Rules
Next
From: Merlin Moncure
Date:
Subject: Re: bytea vs. pg_dump