title: psycopg2: Can't adapt type 'UUID'?
body: <p>I am using psycopg2 to try to insert an entry into a table where the type of the data is the Postgres type 'uuid'.</p>
  
  <p>According to <a href="http://initd.org/psycopg/docs/usage.html#python-types-adaptation" rel="noreferrer">this page</a>, I should be able to directly use the Python type uuid.UUID, as in the following code:</p>
  
  <pre><code>uuid_entry = uuid.uuid4()
  command = "INSERT INTO MyTable (uuid) VALUES (%s)"
  cursor.execute(command, (uuid_entry,))
  </code></pre>
  
  <p>However, when I try to do this, it throws the error:</p>
  
  <pre><code>ProgrammingError(can't adapt type 'UUID')
  </code></pre>
  
  <p>Any ideas on why this is happening? Thanks.</p>