Hi, I'm writing a simple content management system. I need to store SHA1 hash values that are computed externally as the primary key for my biggest table.
I can obviously use a sequence as a primary key and index the SHA1 hex-string for look-up... However, I'm looking for a more elegant solution, where I will simply use the 20-byte SHA1 computed values as the given key to the rows I am about to insert/delete/update in the database table. Is there an efficient storage type that I can use to store and later on use the SHA1 keys as primary keys?
I will obviously need postgres to support using 20-byte values as keys to get this done.
Anyone with any ideas?