title: How to convert pgtype.Int4Array (from pgx library) to []int64 Golang type?
body: <p>I use Go and Postgres (with <a href="https://github.com/jackc/pgx" rel="nofollow noreferrer">pgx driver</a>)</p>
  
  <p>In my Postgres table I have a field with array of integers.
  I have created a variable to store array of integers after scanning.</p>
  
  <pre><code>var ids pgtype.Int4Array
  </code></pre>
  
  <p>How to convert <code>ids</code> to <code>[]int64</code>?</p>