title: Postgresql WITH clause in crosstab queries
body: <p>I create a large query as a Common Table Expression - month_index using <code>WITH</code> clause. Is it possible to refer this Common Table Expression in a crosstab query's source sql? </p>
  
  <p>When I did gets an error 
  relation "month_index" does not exist</p>
  
  <pre><code>WITH month_index AS
  (
        SELECT ...
  )
  SELECT * FROM CROSSTAB(
     'SELECT rowid AS row_name,
     CONCAT(''m'',monthno) AS category,
     nic5dindex AS value
     FROM month_index',
     '*&lt;categorysql&gt;*')
  AS ct(..)
  </code></pre>
  
  <p>I use Postgresql 9.3.</p>