Re: documentation for hashtext?

Поиск
Список
Период
Сортировка
От Massa, Harald Armin
Тема Re: documentation for hashtext?
Дата
Msg-id CAMSP2L6WTCqKm9SbEdJCV4xxGjTqB5do=M0O7eTQU+s7gNf46g@mail.gmail.com
обсуждение исходный текст
Ответ на Re: documentation for hashtext?  (Magnus Hagander <magnus@hagander.net>)
Ответы Re: documentation for hashtext?  (pasman pasmański <pasman.p@gmail.com>)
Re: documentation for hashtext?  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-general
 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... 

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


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

В списке pgsql-general по дате отправления:

Предыдущее
От: Magnus Hagander
Дата:
Сообщение: Re: documentation for hashtext?
Следующее
От: Samba
Дата:
Сообщение: Re: Streaming Replication: Observations, Questions and Comments