title: Postgres - create temp table with SELECT and ON COMMIT DROP
body: <p>In postgres(9.4) I am trying to create a temporary table from select and apply "on commit drop" to same table. I am using below syntax.</p>
  
  <pre><code>CREATE TEMPORARY TABLE t5 ON COMMIT DROP AS select * from test4
  </code></pre>
  
  <p>It gives messages</p>
  
  <pre><code>Query returned successfully: 5 rows affected, 62 ms execution time.
  </code></pre>
  
  <p>But when i query the same table,</p>
  
  <pre><code>select * from t5
  </code></pre>
  
  <p>It throws error,</p>
  
  <pre><code>ERROR:  relation "t5" does not exist
  LINE 1: select * from t5
                        ^
  ********** Error **********
  
  ERROR: relation "t5" does not exist
  SQL state: 42P01
  Character: 15
  </code></pre>
  
  <p>Please let me know what is wrong with my understanding what is the mistake i am committing here.</p>
  
  <p>Thanks </p>