Search Postgresql Archives

Re: documentation for hashtext?

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

 



 hashtext


I believe it's considered an internal function, and not one to rely
on. If you search the archives, you will find reports around a version
upgrade when it changed the output for a certain input and thus broke

yes. I did find that discussion, and a blog post by Peter E. about this breakage.

BUT... 
http://kaiv.wordpress.com/2007/07/23/decreasing-the-index-size-on-wide-columns/

then there is skytools ... using hashtext for various things, and the report:

http://postgresql.1045698.n5.nabble.com/Which-is-faster-md5-or-hashtext-td3251399.html

describing it is fact roughly 40% faster then md5 AND is an integer, so

select sum(hastext(t.*::text)) as signature from datable t

as a fast way of comparing 2 replicated tables is really something to consider....
 
conclusion was that it's not documented because it's internal and
you're not supposed to use/rely on it.

My impression is that people are allready using it, relying their sharding on it, even building indexes on it.

So... I suggest we start documenting it. Even if there was a recommendation not to use it, people will get hurt anyway if their application rely on it and it breaks.

Could I persuade?

Harald

-- 
Harald Armin Massa     www.2ndQuadrant.de
PostgreSQL  Training, Services  and Support

2ndQuadrant Deutschland GmbH     
GF: Harald Armin Massa
Amtsgericht Stuttgart, HRB 736399

[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