<p dir="auto"><strong>Migrated issue, originally created by Anonymous</strong></p>
<p dir="auto">(original reporter: d0ugal) When using</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Index('content_index', 'content', postgresql_using=&quot;gin&quot;)"><pre class="notranslate"><code class="notranslate">Index('content_index', 'content', postgresql_using="gin")
</code></pre></div>
<p dir="auto">I get</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="sqlalchemy.exc.ProgrammingError: (ProgrammingError) data type text has no default operator class for access method &quot;gin&quot;
HINT:  You must specify an operator class for the index or define a default operator class for the data type.
 'CREATE INDEX content_index ON post USING gin (content)' {}"><pre class="notranslate"><code class="notranslate">sqlalchemy.exc.ProgrammingError: (ProgrammingError) data type text 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.
 'CREATE INDEX content_index ON post USING gin (content)' {}
</code></pre></div>
<p dir="auto">because postgres expects something like</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="CREATE INDEX content_index ON post USING gin(to_tsvector('english', content));"><pre class="notranslate"><code class="notranslate">CREATE INDEX content_index ON post USING gin(to_tsvector('english', content));
</code></pre></div>
<p dir="auto"><a href="http://www.postgresql.org/docs/9.1/static/textsearch-tables.html#TEXTSEARCH-TABLES-INDEX" rel="nofollow">http://www.postgresql.org/docs/9.1/static/textsearch-tables.html#TEXTSEARCH-TABLES-INDEX</a></p>
<p dir="auto"><strong>Migrated issue, originally created by jek (<a href="https://github.com/jek">@jek</a>)</strong></p>
<p dir="auto">indexes (postgres and mysql, at least) can be defined as expressions as well as simple column lists.</p>
<p dir="auto">the mysql case isn't really free-form expressions ala postgres, it's 2 options (substring length, sort order) and that can be composed as an expression.  so, alternately, indexes could be definable with expressions and/or per-column meta data.</p>
<p dir="auto">a survey of other dialects would be handy, i'm a pretty rusty on their ddl.</p>
<hr>
<p dir="auto">Attachments: <a href="../wiki/imported_issue_attachments/695/695.patch">695.patch</a></p>