title: psycopg2 where are tables created?
body: <p>I am using the psycopg2 library in python 3.x to create tables in a database. When I access the database, I can, however, not find the tables. Note: I am using a postgresql database.</p>
  
  <p>Here I create the table:</p>
  
  <pre><code># Accessing database
  database = psycopg2.connect(database = "db_name", user="db_user", password="db_password", host="db_host", port="5432")
  
  # Creating a cursor
  dbcur = database.cursor()
  
  # Creating a table
  dbcur.execute("""create table test (var1 varchar);"")
  </code></pre>
  
  <p>If I log into the database and write "\dt" it does not show the table.</p>
  
  <p>If I log into the database and execute the query directly then the table is created and can be shown using "\dt".</p>
  
  <p>Where I am going wrong?</p>