0

I use Go and Postgres (with pgx driver)

In my Postgres table I have a field with array of integers. I have created a variable to store array of integers after scanning.

var ids pgtype.Int4Array

How to convert ids to []int64?

Klimbo
  • 1,308
  • 3
  • 15
  • 34

1 Answers1

6

Use ids.AssignTo(&sliceOfInt64)

Charlie Tumahai
  • 113,709
  • 12
  • 249
  • 242