title: Rename enum item in PostgreSQL
body: <p>I would like to change the name of an item in an enum type in PostgreSQL 9.1.5.  </p>
  
  <p>Here is the type's create stmt:</p>
  
  <pre><code>CREATE TYPE import_action AS ENUM
  ('Ignored',
  'Inserted',
  'Updated',
  'Task created');
  </code></pre>
  
  <p>I just want to change 'Task created' to 'Aborted'.  It seems like from the <a href="http://www.postgresql.org/docs/9.1/static/sql-altertype.html" rel="noreferrer">documentation</a>, that the following should work:</p>
  
  <pre><code>ALTER TYPE import_action
  RENAME ATTRIBUTE "Task created" TO "Aborted"; 
  </code></pre>
  
  <p>However, I get a msg:</p>
  
  <pre><code>********** Error **********
  
  ERROR: relation "import_action" does not exist
  SQL state: 42P01
  </code></pre>
  
  <p>But, it clearly does exist.</p>
  
  <p>The type is currently being used by more than one table. </p>
  
  <p>I'm being to think that there must not be a way to do this.  I've tried the dialog for the type in pgAdminIII, but there is no way that I can see to rename the it there.  (So, either a strong hint that I can't do it, or - I'm hoping - a small oversight be the developer that created that dialog)</p>
  
  <p>If I can't do this in one statment?  Then what do I need to do?  Will I have to write a script to add the item, update all of the records to new value, then drop the old item?  Will that even work?</p>
  
  <p>It's seems like this should be a simple thing.  As I understand it, the records are just storing a reference to the type and item.  I don't think they are actually store the text value that I have given it.  But, maybe I'm wrong here as well.</p>