version-independent hash functions for PostgreSQL