title: Postgres jsonb index on nested integer field
body: <p>I've got the following data structure in my postgres database - a jsonb column called <code>customer</code></p>
  
  <pre><code>{
      "RequestId": "00000000-0000-0000-0000-000000000000",
      "Customer": {
          "Status": "A",
          "AccountId": 14603582,
          "ProfileId": 172,
          "ReferralTypeId": 15
      }
      "Contact": {
          "Telephone": "",
          "Email": ""
      }   
  }
  </code></pre>
  
  <p>I want to create an index on the <code>ProfileId</code> field, which is an integer. </p>
  
  <p>I've been unable to find an example of how to create an index on a nested field. </p>
  
  <p>The query I'm executing (which takes ~300s) is: </p>
  
  <pre><code>select id, customer from where customer @&gt; '{"Customer":{"ProfileId": 172}}'
  </code></pre>