title: PostgreSQL GIN index on array of uuid
body: <p>I would like to use a GIN index on <code>uuid[]</code> (to have efficient membership tests for arrays of uuids). However when I try it PostgreSQL gives me an error:</p>
  
  <pre><code>mydb=&gt; CREATE TABLE foo (val uuid[]);
  CREATE TABLE
  mydb=&gt; CREATE INDEX foo_idx ON foo USING GIN(val);
  ERROR:  data type uuid[] has no default operator class for access method "gin"
  HINT:  You must specify an operator class for the index or define a default operator class for the data type.
  </code></pre>
  
  <p>How can I add the necessary operator class so that it works?</p>
  
  <p>Note that <a href="https://stackoverflow.com/questions/18082625/postgresql-9-2-gin-index-on-citext">this</a> is a similar question for the type <code>citext</code> but the provided answer doesn't work.</p>