Re: Fast, stable, portable hash function producing 4-byte or 8-bytevalues?
От | Laurenz Albe |
---|---|
Тема | Re: Fast, stable, portable hash function producing 4-byte or 8-bytevalues? |
Дата | |
Msg-id | 67fe6aff570841a0fab4c7b9f5c316b5d54f88c3.camel@cybertec.at обсуждение исходный текст |
Ответ на | Fast, stable, portable hash function producing 4-byte or 8-byte values? (Erwin Brandstetter <brsaweda@gmail.com>) |
Ответы |
Re: Fast, stable, portable hash function producing 4-byte or 8-byte values?
|
Список | pgsql-general |
On Tue, 2019-12-10 at 22:11 +0100, Erwin Brandstetter wrote: > I am looking for stable hash functions producing 8-byte or 4-byte hashes from long text values in Postgres 10 or later. > > [...] > > There is an old post from 2012 by Tom Lane suggesting that hashtext() and friends are not for users: > > https://www.postgresql.org/message-id/24463.1329854466%40sss.pgh.pa.us Changing a hash function would corrupt hash indexes, wouldn't it? So I'd expect these functions to be pretty stable: SELECT amp.amproc FROM pg_amproc AS amp JOIN pg_opfamily AS opf ON amp.amprocfamily = opf.oid JOIN pg_am ON opf.opfmethod = pg_am.oid WHERE pg_am.amname = 'hash' AND amp.amprocnum = 1; Or at least there would have to be a fat warning in the release notes to reindex hash indexes. Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com
В списке pgsql-general по дате отправления: