diff --git a/dialect/postgres/util.go b/dialect/postgres/util.go index 637bfd8..ea701c3 100644 --- a/dialect/postgres/util.go +++ b/dialect/postgres/util.go @@ -4,6 +4,7 @@ import ( "encoding/json" "fmt" "net" + "time" "github.com/jackc/pgtype" "github.com/jackc/pgx/v4" @@ -131,6 +132,15 @@ func marshalRows(rows pgx.Rows) (map[string]interface{}, error) { } } + results[k] = values + case pgtype.TimestampArray: + var values []time.Time + if v.Elements != nil { + if err := v.AssignTo(&values); err != nil { + return nil, fmt.Errorf("unable to decode %v+: %w", v, err) + } + } + results[k] = values case pgtype.Int2Array: var values []int8