title: Postgresql: create a table and delete if exist
body: <p>I'm running a batch of postgres queries from a python script. Some queries are as follow:</p>
  
  <pre><code>create table xxx [...]
  </code></pre>
  
  <p>Usually I get the following error:</p>
  
  <pre><code>psycopg2.ProgrammingError: relation "xxx" already exists
  </code></pre>
  
  <p>I know that i can manually delete the xxx table, but i ask me if there are a way to avoid this error. Something like delete xxx table if exist.</p>
  
  <p>Thanks</p>