title: At what level do Postgres index names need to be unique?
body: <p>In <a href="https://stackoverflow.com/a/1732007/1487413">Microsoft SQL Server</a> and MySQL, index names need to unique within the table, but not within the database. This doesn't seem to be the case for PostgreSQL.</p>
  
  <p>Here's what I'm doing: I made a copy of a table using <code>CREATE TABLE new_table AS SELECT * FROM old_table</code> etc and need to re-create the indexes.</p>
  
  <p>Running a query like <code>CREATE INDEX idx_column_name ON new_table USING GIST(column_name)</code> causes <code>ERROR: relation "idx_column_name" already exists</code></p>
  
  <p>What's going on here?</p>