Search Postgresql Archives

Re: hash options

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jan 23, 2012 at 2:59 AM, Little, Douglas
<DOUGLAS.LITTLE@xxxxxxxxxx> wrote:
>
> I’ve implemented with MD5.  It works fine,  the problem I have is the size of the md5 (32 bytes) is often longer than the original string – thus not accomplishing what I want – space savings.

You can always use a truncated hash - for instance, take the first 6-8
hex digits of the MD5 or SHA1 hash. For human readability, that's
likely to be all you need (for instance, git references commits by
their SHA1 hashes, but you can work with just the first six digits
quite happily). Otherwise, can you provide more details on why you
need a hash, and why it wants to be shorter than the original?

Chris Angelico

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux