PostgreSQL GIN and GiST index support#3706
PostgreSQL GIN and GiST index support#3706chaffeqa wants to merge 3 commits intorails:masterfrom chaffeqa:master
Conversation
… indexes() now instantiates that :type
|
would it be better to just have a :method option (instead of :gist/:gin)? after all, an index can't have more than one method. this would simplify PostgresqlAdapter#add_index, would support all index types (btree/hash/gist/gin), would allow for user-defined index methods, and make the whole thing future proof. i personally prefer :type over :method, but that could get confused w/ index_type (i.e. "" or "UNIQUE"). also the postgres docs generally call it method. |
|
great call! will hop on that tomorrow night. In a side note... I've been reading up on MySQLs full text and indexes... looks like it can use a |
|
Any updates on this? With hstore being added to 4.0 this PR too would be nice. |
|
Hey, your pull request does not apply cleanly on master anymore. Would you mind bringing it up-to-date to master, so we can continue the discussion? I agree this could be an interesting addition to 4.0, thanks! |
|
Hey, right now I'm working on this. New pull request: #6101 |
|
Thanks a bunch @MSNexploder |
Added add_index override in postgresql_adapter to allow for GiST and GIN support.
Added PostgresqlAdapter indexes() :type support (specifying :btree, :gin, and :gist index types).
NOTE: instead of hacking the IndexDefinition class, I just added a
:typeattribute to theabstract/schema_definitions.rbAdded tests for add_index. Updated tests for postgresql/schema_tests to check for index :type.
Let me know if there are other schema related updates I should do. Would gladly do so :)
(refs this old pull )