title: Tablefunc in Redshift to pivot table not supported?
body: <p>I am trying to pivot a table in Redshift. This answer is instructive: <a href="https://stackoverflow.com/a/11751905/3063339">https://stackoverflow.com/a/11751905/3063339</a>
  However, when I run the</p>
  
  <pre><code>CREATE EXTENSION tablefunc;
  </code></pre>
  
  <p>command I get the error:</p>
  
  <pre><code>syntax error at or near "EXTENSION"
  </code></pre>
  
  <p>Does redShift not support the syntax above, or <code>tablefunc</code>, or neither? If so, are there any RedShift functions that could act as a workaround? I am aware a table can be pivoted with basic postgresql commands <code>SUM(CASE ...)</code> etc. These do not scale well for large tables though. Many thanks.</p>