title: Difference between a temporary view created by `WITH` and a temporary view created by `CREATE TEMPORARY VIEW`?
body: <p>In PostgreSQL:</p>
  <ol>
  <li><p>Does <code>WITH</code> clause create a temporary view or a temporary table? (If I am correct a view stores the code of a query, while a table stores the result of a query)</p>
  </li>
  <li><p><code>CREATE TEMPORARY VIEW</code> creates a temporary view available only in the current session.</p>
  <p>So what is the difference between a temporary view created by <code>WITH</code> and a temporary view created by <code>CREATE TEMPORARY VIEW</code>?</p>
  </li>
  </ol>
  <p>Database System Concepts seems to imply that <code>WITH</code> creates a temporary view instead of a temporary table:</p>
  <blockquote>
  <p>Since the SQL:1999 version, the SQL standard supports a limited form of recursion, using the with recursive clause, where a view (or temporary view) is
  expressed in terms of itself. Recursive queries can be used, for example, to express
  transitive closure concisely. Recall that <strong>the with clause is used to deﬁne a temporary view</strong> whose deﬁnition is available only to the query in which it is deﬁned.
  The additional keyword recursive speciﬁes that the view is recursive.</p>
  </blockquote>