title: Hash a column in postgres using sha-256
body: <p>I have a postrges database with a table contains key codes that I have generated using a python function. I would like to be able to hash this column such that each time a key code is added to it, the key is hashed. How can I get postgres to do that? Or what will be the best way to store these codes. Here is a sample of the column I would like to hash in my table.</p>
  
  <pre><code> key_codes | 
  -----------+
   L7G4J83K  |        
   J70KG169  |         
   L69E540K  |        
   GL8E9C3J  |         
   6C0LE215  |         
   9G01C8JA  |         
   1G9KC58A  |         
  </code></pre>