{"action":"created","issue":{"url":"https://api.github.com/repos/rails/rails/issues/23393","repository_url":"https://api.github.com/repos/rails/rails","labels_url":"https://api.github.com/repos/rails/rails/issues/23393/labels{/name}","comments_url":"https://api.github.com/repos/rails/rails/issues/23393/comments","events_url":"https://api.github.com/repos/rails/rails/issues/23393/events","html_url":"https://github.com/rails/rails/pull/23393","id":130261421,"number":23393,"title":"Add Expression Indexes and Operator Classes support for PostgreSQL","user":{"login":"kamipo","id":12642,"avatar_url":"https://avatars.githubusercontent.com/u/12642?v=3","gravatar_id":"","url":"https://api.github.com/users/kamipo","html_url":"https://github.com/kamipo","followers_url":"https://api.github.com/users/kamipo/followers","following_url":"https://api.github.com/users/kamipo/following{/other_user}","gists_url":"https://api.github.com/users/kamipo/gists{/gist_id}","starred_url":"https://api.github.com/users/kamipo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kamipo/subscriptions","organizations_url":"https://api.github.com/users/kamipo/orgs","repos_url":"https://api.github.com/users/kamipo/repos","events_url":"https://api.github.com/users/kamipo/events{/privacy}","received_events_url":"https://api.github.com/users/kamipo/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/rails/rails/labels/activerecord","name":"activerecord","color":"0b02e1"},{"url":"https://api.github.com/repos/rails/rails/labels/needs%20feedback","name":"needs feedback","color":"ededed"},{"url":"https://api.github.com/repos/rails/rails/labels/PostgreSQL","name":"PostgreSQL","color":"fbca04"}],"state":"open","locked":false,"assignee":{"login":"rafaelfranca","id":47848,"avatar_url":"https://avatars.githubusercontent.com/u/47848?v=3","gravatar_id":"","url":"https://api.github.com/users/rafaelfranca","html_url":"https://github.com/rafaelfranca","followers_url":"https://api.github.com/users/rafaelfranca/followers","following_url":"https://api.github.com/users/rafaelfranca/following{/other_user}","gists_url":"https://api.github.com/users/rafaelfranca/gists{/gist_id}","starred_url":"https://api.github.com/users/rafaelfranca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rafaelfranca/subscriptions","organizations_url":"https://api.github.com/users/rafaelfranca/orgs","repos_url":"https://api.github.com/users/rafaelfranca/repos","events_url":"https://api.github.com/users/rafaelfranca/events{/privacy}","received_events_url":"https://api.github.com/users/rafaelfranca/received_events","type":"User","site_admin":false},"milestone":null,"comments":6,"created_at":"2016-02-01T05:36:10Z","updated_at":"2016-04-19T08:03:12Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/rails/rails/pulls/23393","html_url":"https://github.com/rails/rails/pull/23393","diff_url":"https://github.com/rails/rails/pull/23393.diff","patch_url":"https://github.com/rails/rails/pull/23393.patch"},"body":"Example:\r\n\r\n```ruby\r\ncreate_table :users do |t|\r\n  t.string :name\r\n  t.index -> { 'lower(name)' }\r\n  t.index -> { 'name varchar_pattern_ops' }\r\nend\r\n```\r\n\r\nFixes #19090, #21765, #21819."},"comment":{"url":"https://api.github.com/repos/rails/rails/issues/comments/211784082","html_url":"https://github.com/rails/rails/pull/23393#issuecomment-211784082","issue_url":"https://api.github.com/repos/rails/rails/issues/23393","id":211784082,"user":{"login":"jeremy","id":199,"avatar_url":"https://avatars.githubusercontent.com/u/199?v=3","gravatar_id":"","url":"https://api.github.com/users/jeremy","html_url":"https://github.com/jeremy","followers_url":"https://api.github.com/users/jeremy/followers","following_url":"https://api.github.com/users/jeremy/following{/other_user}","gists_url":"https://api.github.com/users/jeremy/gists{/gist_id}","starred_url":"https://api.github.com/users/jeremy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeremy/subscriptions","organizations_url":"https://api.github.com/users/jeremy/orgs","repos_url":"https://api.github.com/users/jeremy/repos","events_url":"https://api.github.com/users/jeremy/events{/privacy}","received_events_url":"https://api.github.com/users/jeremy/received_events","type":"User","site_admin":false},"created_at":"2016-04-19T08:03:11Z","updated_at":"2016-04-19T08:03:11Z","body":"Gotcha. In that case, compare with e.g.\r\n```ruby\r\ncreate_table :users do |t|\r\n  t.string :first_name\r\n  t.string :last_name\r\n  t.index expression: <<-EXPRESSIONS\r\n    first_name || last_name,\r\n    upper(first_name) varchar_pattern_ops,\r\n    lower(last_name) varchar_pattern_ops\r\n  EXPRESSIONS\r\nend\r\n```"}}