I'm using the hash function murmur2
which returns me an uint64
.
I want then to store it in PostgreSQL, which only support BIGINT
(signed 64 bits).
As I'm not interested in the number itself, but just the binary value (as I use it as an id for detecting uniqueness (my set of values being of ~1000 values, a 64bit hash is enough for me) I would like to convert it into int64
by "just" changing the type.
How does one do that in a way that pleases the compiler?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…