dockyard/postgres_ext — pull request #47 by mariovisic (2012-12-18 03:50:47+00:00)
Title: Schema dumping for indexes without an index_opclass

When you dump the schema for a GIN index it outputs a blank `index_opclass` argument like so:

```ruby
add_index "services", ["weighted_search"], :name => "services_weighted_search_idx", :index_type => :gin, :index_opclass => []
```

Trying to load the schema results in this error:

```
PG::Error: ERROR: syntax error at or near "]"
LINE 1: ...d_search_idx" ON "services" USING gin ("weighted_search" [])
^
: CREATE INDEX "services_weighted_search_idx" ON "services" USING gin ("weighted_search" [])
```

A fix is attached with tests. Let me know if there's any issues, cheers.