title: Amazon RedShift Drop Default
body: <p>I want to add a NOT NULL column to a table in RedShift.  To do this, I specify a default so that existing rows know what to put in the new column.  But I don't want a default on this column - if no data is supplied in my COPY command, I want it to fail.  In Postgres I could do this:</p>
  
  <pre><code>ALTER TABLE my_table ALTER COLUMN my_column DROP DEFAULT;
  </code></pre>
  
  <p>However Redshift gives me an error saying <code>ERROR: ALTER COLUMN SET/DROP DEFAULT is not supported</code>.</p>
  
  <p>What is the correct way to add a non-null column, update existing rows, and not have a default?</p>
  
  <p>UPDATE: It seems Redshift <a href="https://stackoverflow.com/questions/29536916/redshift-how-to-remove-not-null-constraint">won't allow any ALTER COLUMN statements</a>.  Does that make this impossible?</p>