title: Table won't alter when using psycopg
body: <p>I'm having some trouble altering tables in my postgres database. I'm using psycopg2 and working out of Python. I tried to add a serial primary key. It took a long time (large table), and threw no error, so it did <em>something</em>, but when I went to check, the new column wasn't there.</p>
  
  <p>I'm hoping this is something silly that I've missed, but right now I'm at a total loss. </p>
  
  <pre><code>import psycopg2
  username = *****
  password = *****
  conn = psycopg2.connect(database='mydb',user=username,password=password)
  query = "ALTER TABLE mytable ADD COLUMN sid serial PRIMARY KEY"
  cur = conn.cursor()
  cur.execute(query)
  conn.close()
  </code></pre>
  
  <p>Other things I've tried while debugging:</p>
  
  <ul>
  <li>It doesn't work when I remove PRIMARY KEY.</li>
  <li>It doesn't work when try a different data type.</li>
  </ul>